From 28e56332c0e8cd3e5982b7b915c0d4c5d6131b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=99=9A=20PH=E2=91=A6=20de=20Soria=E2=84=A2=E2=99=9B?= Date: Sun, 3 Apr 2022 08:43:33 +0930 Subject: [PATCH] Update FoodScanAppService.php --- FoodScanAppService.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FoodScanAppService.php b/FoodScanAppService.php index 9355d0b..470595f 100644 --- a/FoodScanAppService.php +++ b/FoodScanAppService.php @@ -41,7 +41,7 @@ } } switch ($_REQUEST['Service']) { - /********** User Functions **********/ + /*** User ***/ case User::REGISTRATION_ACTION: case User::LOGIN_ACTION: case User::CHANGE_PASSWORD_ACTION: @@ -50,7 +50,6 @@ case User::DELETE_ACCOUNT_ACTION: case User::DATA_TAKEOUT: case User::LOGS_ACTION: - $access_key = validateObject($postData, 'access_key', ''); $access_key = addslashes($access_key); @@ -77,6 +76,8 @@ } } break; + + /*** Food Items ***/ case 'addToFavourite': case 'getAllUserFavourite': case 'getProductDetails': @@ -115,6 +116,8 @@ } } break; + + /*** Security ***/ case Security::UPDATE_USER_TOKEN: case Security::TEST_ENCRYPTION: case Security::REFRESH_TOKEN: @@ -126,6 +129,7 @@ $data['message'] = $_REQUEST['Service']; } } + // (new AllowCors)->init(); // Set CORS headers header('Content-type: application/json'); echo json_encode($data);