Only ingest online orders for accounts running a POS kitchen
Deploy Ladill POS / deploy (push) Successful in 38s
Deploy Ladill POS / deploy (push) Successful in 38s
Guard ingestExternalOrder: skip (200, no ticket created) when the owner has no restaurant-mode POS location, so pushing from Merchant is harmless for accounts that don't use the POS kitchen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9780591e74
commit
e9d483394c
@@ -39,6 +39,11 @@ class KitchenIngestController extends Controller
|
||||
return response()->json(['message' => $e->getMessage()], 422);
|
||||
}
|
||||
|
||||
// Owner doesn't run a POS kitchen — accept and ignore.
|
||||
if ($sale === null) {
|
||||
return response()->json(['skipped' => true], 200);
|
||||
}
|
||||
|
||||
return response()->json(['id' => $sale->id, 'reference' => $sale->reference], 201);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user