أُنشئ من Tokal/Test
Fix API reliability and CORS config for hosted deployment
هذا الالتزام موجود في:
@@ -281,6 +281,8 @@ class ReservationController extends Controller
|
||||
// CREATE RESERVATION (customer)
|
||||
public function store(Request $request)
|
||||
{
|
||||
@set_time_limit(120);
|
||||
|
||||
$user = $request->user();
|
||||
if ($user->isBlocked()) {
|
||||
return response()->json(['message' => 'You are temporarily blocked from making reservations.'], 403);
|
||||
@@ -319,7 +321,8 @@ class ReservationController extends Controller
|
||||
'rejection_reason' => null,
|
||||
]);
|
||||
|
||||
$table = $this->findAvailableTable($reservation, true, true);
|
||||
// Avoid long lock waits in high-latency environments; use optimistic read.
|
||||
$table = $this->findAvailableTable($reservation, true, false);
|
||||
if (! $table) {
|
||||
throw new \RuntimeException('No available table for this reservation.');
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم