Update: 2026-08-02 17:52:28
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
// food/courier/toggle_availability.php — تفعيل/إيقاف "وضع التوصيل" للسائق
|
||||
// السائق لا يظهر لعروض التوصيل إلا إذا كان أيضاً متاحاً فعلياً في geo:drivers:available
|
||||
require_once __DIR__ . '/../connect_courier.php';
|
||||
|
||||
$enable = filterRequest('enabled', 'bool');
|
||||
if ($enable === null) jsonError('enabled (true|false) is required');
|
||||
|
||||
foodCourierOptIn($food_courier_id, $enable);
|
||||
|
||||
jsonSuccess(['courier_id' => $food_courier_id, 'delivery_mode_enabled' => $enable]);
|
||||
Reference in New Issue
Block a user