fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -50,7 +50,7 @@ class EventController extends BaseApiController
public function show(int $eventId): JsonResponse
{
$event = $this->listService->find($eventId);
if (!$event) {
if (! $event) {
return response()->json(['ok' => false, 'message' => 'Event not found.'], 404);
}
@@ -73,6 +73,7 @@ class EventController extends BaseApiController
$result = $this->managementService->create($payload, $request->file('flyer'), $guard);
} catch (\Throwable $e) {
Log::error('Event creation failed.', ['error' => $e->getMessage()]);
return response()->json(['ok' => false, 'message' => 'Failed to create event.'], 500);
}
@@ -176,9 +177,6 @@ class EventController extends BaseApiController
]);
}
/**
* @return int|JsonResponse
*/
private function authenticatedUserIdOrUnauthorized(): int|JsonResponse
{
$userId = (int) (auth()->id() ?? 0);