fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -59,7 +59,7 @@ class NotificationController extends BaseApiController
}
$row = $this->showService->getForUser($guard, $notificationId);
if (! $row) {
if (!$row) {
return response()->json(['ok' => false, 'message' => 'Notification not found.'], 404);
}
@@ -82,7 +82,6 @@ class NotificationController extends BaseApiController
$result = $this->sendService->send($payload, $guard);
} catch (\Throwable $e) {
Log::error('Notification send failed.', ['error' => $e->getMessage()]);
return response()->json(['ok' => false, 'message' => 'Failed to send notification.'], 500);
}
@@ -115,7 +114,7 @@ class NotificationController extends BaseApiController
public function destroy(int $notificationId): JsonResponse
{
$deleted = $this->managementService->delete($notificationId);
if (! $deleted) {
if (!$deleted) {
return response()->json(['ok' => false, 'message' => 'Notification not found.'], 404);
}
@@ -125,7 +124,7 @@ class NotificationController extends BaseApiController
public function restore(int $notificationId): JsonResponse
{
$restored = $this->managementService->restore($notificationId);
if (! $restored) {
if (!$restored) {
return response()->json(['ok' => false, 'message' => 'Notification not found.'], 404);
}
@@ -140,7 +139,7 @@ class NotificationController extends BaseApiController
}
$ok = $this->readService->markRead($guard, $notificationId);
if (! $ok) {
if (!$ok) {
return response()->json(['ok' => false, 'message' => 'Notification not found.'], 404);
}
@@ -168,6 +167,9 @@ class NotificationController extends BaseApiController
]);
}
/**
* @return int|JsonResponse
*/
private function authenticatedUserIdOrUnauthorized(): int|JsonResponse
{
$userId = (int) (auth()->id() ?? 0);