Update: 2026-08-02 18:28:40

This commit is contained in:
Hamza-Ayed
2026-08-02 18:28:40 +03:00
parent 03a21aa95d
commit 02e652a786
9 changed files with 98 additions and 9 deletions
+2
View File
@@ -22,6 +22,8 @@ $food_admin_id = (string)($decoded->user_id ?? '');
try {
$food_con = Database::get('food');
} catch (Exception $e) {
// السبب الحقيقي في اللوج فقط — الرد يبقى عاماً.
error_log('[FOOD] DB connection failed in ' . basename(__FILE__) . ': ' . $e->getMessage());
http_response_code(503);
echo json_encode(['status' => 'failure', 'message' => 'Food service unavailable']);
exit;
+2
View File
@@ -31,6 +31,8 @@ $food_passenger_id = (string)($decoded->user_id ?? '');
try {
$food_con = Database::get('food');
} catch (Exception $e) {
// السبب الحقيقي في اللوج فقط — الرد يبقى عاماً.
error_log('[FOOD] DB connection failed in ' . basename(__FILE__) . ': ' . $e->getMessage());
http_response_code(503);
echo json_encode(['status' => 'failure', 'message' => 'Food service unavailable']);
exit;
+2
View File
@@ -28,6 +28,8 @@ $food_courier_id = (string)($decoded->user_id ?? '');
try {
$food_con = Database::get('food');
} catch (Exception $e) {
// السبب الحقيقي في اللوج فقط — الرد يبقى عاماً.
error_log('[FOOD] DB connection failed in ' . basename(__FILE__) . ': ' . $e->getMessage());
http_response_code(503);
echo json_encode(['status' => 'failure', 'message' => 'Food service unavailable']);
exit;
+2
View File
@@ -30,6 +30,8 @@ $limiter->enforce(RateLimiter::identifier(), 'api');
try {
$food_con = Database::get('food');
} catch (Exception $e) {
// السبب الحقيقي في اللوج فقط — الرد يبقى عاماً.
error_log('[FOOD] DB connection failed in ' . basename(__FILE__) . ': ' . $e->getMessage());
http_response_code(503);
echo json_encode(['status' => 'failure', 'message' => 'Food service unavailable']);
exit;