Merge pull request #258 from WDI-Ideas/sayli

Sayli
This commit is contained in:
Sayli Raut
2024-07-04 13:10:19 +05:30
committed by GitHub

View File

@@ -255,7 +255,7 @@ class RestaurantApiServices
->count();
if ($redeemCountState >= $stateMaxLimitation) {
return jsonResponseWithErrorMessageApi(__('auth.state_limit_reached'), 301);
return jsonResponseWithErrorMessageApi(__('auth.state_limit_reached'), 404);
}
// Calculate the restaurant interval start date
@@ -266,7 +266,7 @@ class RestaurantApiServices
->count();
if ($redeemCountRestaurant >= $restaurantMaxLimitation) {
return jsonResponseWithErrorMessageApi(__('auth.restaurant_limit_reached'), 301);
return jsonResponseWithErrorMessageApi(__('auth.restaurant_limit_reached'), 404);
}
// Get the last redeem time
@@ -291,13 +291,13 @@ class RestaurantApiServices
$allowedRedeemTime = $lastRedeemTime->copy()->addHours($stateTimeHours);
if ($currentTime < $allowedRedeemTime) {
return jsonResponseWithErrorMessageApi(__('auth.redeem_not_allowed_yet'), 301);
return jsonResponseWithErrorMessageApi(__('auth.redeem_not_allowed_yet'), 404);
}
$allowedRedeemTime = $lastRedeemTime->copy()->addHours($restTimeHours);
if ($currentTime < $allowedRedeemTime) {
return jsonResponseWithErrorMessageApi(__('auth.redeem_not_allowed_yet'), 301);
return jsonResponseWithErrorMessageApi(__('auth.redeem_not_allowed_yet'), 404);
}
}