diff --git a/app/Http/Controllers/NotificationsController.php b/app/Http/Controllers/NotificationsController.php index add7a50..1a69b9a 100644 --- a/app/Http/Controllers/NotificationsController.php +++ b/app/Http/Controllers/NotificationsController.php @@ -23,7 +23,7 @@ class NotificationsController extends Controller } } - public function deleteNotification(Request $request, int $notificationId): JsonResponse + public function deleteNotification(Request $request, string $notificationId): JsonResponse { try { $notification = $request->user()->notifications()->findOrFail($notificationId); diff --git a/routes/notifications.php b/routes/notifications.php index ba11d61..f72ce3c 100644 --- a/routes/notifications.php +++ b/routes/notifications.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\Route; Route::middleware(['web', 'auth:sanctum'])->get('/users/notifications', [NotificationsController::class, "getNotifications"]); Route::middleware(['web', 'auth:sanctum'])->delete('/users/delete/notification/{notificationId}', [NotificationsController::class, 'deleteNotification']) - ->whereNumber('notificationId'); + ->whereUuid('notificationId'); Route::middleware(['web', 'auth:sanctum'])->post('/users/notifications/read', [NotificationsController::class, "readNotifications"]);