Skip to content

Commit

Permalink
Update FoodScanAppService.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 authored Apr 2, 2022
1 parent a39e395 commit 28e5633
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions FoodScanAppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
}
switch ($_REQUEST['Service']) {
/********** User Functions **********/
/*** User ***/
case User::REGISTRATION_ACTION:
case User::LOGIN_ACTION:
case User::CHANGE_PASSWORD_ACTION:
Expand All @@ -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);

Expand All @@ -77,6 +76,8 @@
}
}
break;

/*** Food Items ***/
case 'addToFavourite':
case 'getAllUserFavourite':
case 'getProductDetails':
Expand Down Expand Up @@ -115,6 +116,8 @@
}
}
break;

/*** Security ***/
case Security::UPDATE_USER_TOKEN:
case Security::TEST_ENCRYPTION:
case Security::REFRESH_TOKEN:
Expand All @@ -126,6 +129,7 @@
$data['message'] = $_REQUEST['Service'];
}
}

// (new AllowCors)->init(); // Set CORS headers
header('Content-type: application/json');
echo json_encode($data);

0 comments on commit 28e5633

Please sign in to comment.