From 8869dd656a434b3bebc8327ce4279cb088dccb8e Mon Sep 17 00:00:00 2001 From: sayliraut Date: Fri, 31 May 2024 11:25:44 +0530 Subject: [PATCH] changes --- .../APIs/Customer_API/RestaurantControllerApi.php | 14 +++++++------- .../APIs/CustomerAPIs/RestaurantApiServices.php | 2 +- routes/customer_api.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Admin/APIs/Customer_API/RestaurantControllerApi.php b/app/Http/Controllers/Admin/APIs/Customer_API/RestaurantControllerApi.php index 5247dc9..a280ace 100644 --- a/app/Http/Controllers/Admin/APIs/Customer_API/RestaurantControllerApi.php +++ b/app/Http/Controllers/Admin/APIs/Customer_API/RestaurantControllerApi.php @@ -25,15 +25,15 @@ class RestaurantControllerApi extends Controller public function getCoordinates() { try { - $token = readHeaderToken(); + // $token = readHeaderToken(); - if ($token) { - $customerIamId = $token['sub']; - $response = $this->RestaurantApiServices->getCoordinates($customerIamId); + // if ($token) { + // $customerIamId = $token['sub']; + $response = $this->RestaurantApiServices->getCoordinates(); return $response; - } else { - return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409); - } + // } else { + // return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409); + // } } catch (\Exception $e) { Log::error('Passport function failed: ' . $e->getMessage()); return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); diff --git a/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php b/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php index b5aa011..228af4a 100644 --- a/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php +++ b/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Log; class RestaurantApiServices { - public function getCoordinates($customerIamId) + public function getCoordinates() { try { $restaurant = ManageRestaurant::select( diff --git a/routes/customer_api.php b/routes/customer_api.php index e77d963..78d7635 100644 --- a/routes/customer_api.php +++ b/routes/customer_api.php @@ -8,6 +8,7 @@ use App\Http\Controllers\Admin\APIs\Customer_API\RestaurantControllerApi; use Illuminate\Support\Facades\Route; +Route::get('/v1/list-of-coordinates', [RestaurantControllerApi::class, 'getCoordinates']); Route::middleware(['customerApiBasicAuth'])->group(function () { @@ -46,7 +47,6 @@ Route::post('/v1/delete_account', [CustomerControllerApi::class, 'destroyAccount //*******************************************************Restaurant******************************************************** -Route::get('/v1/list-of-coordinates', [RestaurantControllerApi::class, 'getCoordinates']); Route::post('/v1/add-to-favourite', [RestaurantControllerApi::class, 'addToFavourite']); Route::get('/v1/list-of-fav-restaurant', [RestaurantControllerApi::class, 'listFavRestaurant']);