From 442ae2a8835d770fa4f573de5bac141344013fe8 Mon Sep 17 00:00:00 2001 From: Dillon Date: Fri, 28 Jul 2023 12:03:46 +0800 Subject: [PATCH] Debugging --- app/Http/Middleware/ValidateToken.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); }