diff --git a/app/Http/Middleware/ValidateToken.php b/app/Http/Middleware/ValidateToken.php index 288a3311..846972aa 100644 --- a/app/Http/Middleware/ValidateToken.php +++ b/app/Http/Middleware/ValidateToken.php @@ -33,15 +33,15 @@ class ValidateToken */ public function handle($request, Closure $next) { - // try { + try { - // if(!$this->manager->check()){ throw new AccessUnauthorisedException(); } + if(!$this->manager->check()){ throw new AccessUnauthorisedException(); } - // } catch (Exception $exception) { + } catch (Exception $exception) { - // return (new ApiResponseObject('Authentication', 'To keep your account secure we need to re-validate your account', HttpStatus::ACCESS_UNAUTHORISED))->handler(); + return (new ApiResponseObject('Authentication', 'To keep your account secure we need to re-validate your account', HttpStatus::ACCESS_UNAUTHORISED))->handler(); - // } + } return $next($request); }