change notifications functions

This commit is contained in:
2025-12-17 17:18:37 +01:00
parent 08c51473a7
commit 08459ac627
5 changed files with 10 additions and 63 deletions
+2 -7
View File
@@ -3,12 +3,7 @@
use App\Http\Controllers\NotificationsController;
use Illuminate\Support\Facades\Route;
Route::middleware(['web', 'auth:sanctum'])->get('/users/{id}/notifications', [NotificationsController::class, "getNotifications"])
->whereNumber('id');
Route::middleware(['web', 'auth:sanctum'])->get('/users/notifications', [NotificationsController::class, "getNotifications"]);
Route::middleware(['web', 'auth:sanctum'])->post("/users/{id}/create/notification", [NotificationsController::class, "createNotification"])
->whereNumber('id');
Route::middleware(['web', 'auth:sanctum'])->delete('/users/{userId}/delete/notification/{notificationId}', [NotificationsController::class, 'deleteNotification'])
->whereNumber('userId')
Route::middleware(['web', 'auth:sanctum'])->delete('/users/delete/notification/{notificationId}', [NotificationsController::class, 'deleteNotification'])
->whereNumber('notificationId');