feat(scanner): refactor ticket scanning endpoint to accept UUID in request body and add validation

This commit is contained in:
2026-09-07 16:18:16 -03:00
parent e9521e65d0
commit b607c1b673
7 changed files with 74 additions and 15 deletions

View File

@@ -7,8 +7,7 @@ Route::prefix('v1/scanner/tickets')
->middleware(['auth:sanctum', 'scanner.tenant'])
->group(function (): void {
Route::get('/', [TicketController::class, 'index']);
Route::post('scan', [TicketController::class, 'scan']);
Route::get('{ticketUuid}', [TicketController::class, 'show'])
->whereUuid('ticketUuid');
Route::post('{ticketUuid}/scan', [TicketController::class, 'scan'])
->whereUuid('ticketUuid');
});