search api
This commit is contained in:
@@ -68,19 +68,19 @@ class RedeemControllerApi extends Controller
|
||||
* Created at : 11 June 2024
|
||||
* Use : Search Redemption coupon.
|
||||
*/
|
||||
// public function searchRedemption(Request $request)
|
||||
// {
|
||||
// try {
|
||||
// $token = readRestHeaderToken();
|
||||
// if ($token) {
|
||||
// $restIamId = $token['sub'];
|
||||
// return $this->RedeemApiService->searchRedemption($restIamId, $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);
|
||||
// }
|
||||
// }
|
||||
public function searchRedemption(Request $request)
|
||||
{
|
||||
try {
|
||||
$token = readRestHeaderToken();
|
||||
if ($token) {
|
||||
$restIamId = $token['sub'];
|
||||
return $this->RedeemApiService->searchRedemption($restIamId, $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