Search restaurant API
This commit is contained in:
@@ -171,7 +171,7 @@ class RestaurantControllerApi extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Created By : Sayli Raut
|
||||
* Created at : 04 June 2024
|
||||
* Use : To redeem restaurant.
|
||||
@@ -198,4 +198,26 @@ class RestaurantControllerApi extends Controller
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Created By : Sayli Raut
|
||||
* Created at : 20 June 2024
|
||||
* Use : To search from restaurant.
|
||||
*/
|
||||
public function searchRestaurant(Request $request)
|
||||
{
|
||||
try {
|
||||
$token = readHeaderToken();
|
||||
if ($token) {
|
||||
$customerIamId = $token['sub'];
|
||||
return $this->RestaurantApiServices->searchRestaurant($customerIamId, $request);
|
||||
} else {
|
||||
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user