create notification bruno request and move some routes
This commit is contained in:
@@ -23,5 +23,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
Route::middleware('api')->prefix('api')->group(base_path('routes/users.php'));
|
||||
Route::middleware('api')->prefix('api')->group(base_path('routes/auth.php'));
|
||||
Route::middleware('api')->prefix('api')->group(base_path('routes/events.php'));
|
||||
Route::middleware('api')->prefix('api')->group(base_path('routes/notifications.php'));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="logoIcone.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Comité des fêtes de Beaupont</title>
|
||||
<script type="module" crossorigin src="/assets/index-Bm5We1uf.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-1oYDhgBl.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DBz-GVvs.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
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'])->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')
|
||||
->whereNumber('notificationId');
|
||||
@@ -1,13 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\AuthController;
|
||||
use App\Http\Controllers\SearchController;
|
||||
use App\Http\Controllers\UserController;
|
||||
use App\Http\Controllers\EventsController;
|
||||
use App\Http\Controllers\NotificationsController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\TasksController;
|
||||
|
||||
|
||||
|
||||
@@ -37,15 +32,5 @@ Route::middleware(['web', 'auth:sanctum'])->get('/users/{id}/tasks', [UserContro
|
||||
|
||||
Route::middleware(['web', 'auth:sanctum'])->get('/users/tasks/{idTask}', [UserController::class, "getUserTaskById"]);
|
||||
|
||||
Route::middleware(['web', 'auth:sanctum'])->get('/users/{id}/notifications', [NotificationsController::class, "getNotifications"])
|
||||
->whereNumber('id');
|
||||
|
||||
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')
|
||||
->whereNumber('notificationId');
|
||||
|
||||
Route::middleware(['web', 'auth:sanctum'])->get('/users/search', [SearchController::class, "searchUsers"]);
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Login
|
||||
type: http
|
||||
seq: 6
|
||||
seq: 5
|
||||
}
|
||||
|
||||
post {
|
||||
@@ -18,8 +18,8 @@ body:json {
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
email: user@test.com
|
||||
password: 1234
|
||||
email: gio@gmail.com
|
||||
password: 12345678
|
||||
}
|
||||
|
||||
assert {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Logout
|
||||
type: http
|
||||
seq: 7
|
||||
seq: 8
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
meta {
|
||||
name: Create notification
|
||||
type: http
|
||||
seq: 12
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users/{{id}}/create/notification
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"content": "{{content}}"
|
||||
}
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
id: 12
|
||||
content: test
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
meta {
|
||||
name: Delete user notification
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{url}}/api/users/{{userId}}/delete/notification/{{notificationId}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
userId:
|
||||
notificationId:
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
meta {
|
||||
name: Get user notifications
|
||||
type: http
|
||||
seq: 12
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/users/{{id}}/notifications
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
id: 12
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
meta {
|
||||
name: Notifications
|
||||
seq: 8
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Create user
|
||||
type: http
|
||||
seq: 6
|
||||
seq: 5
|
||||
}
|
||||
|
||||
post {
|
||||
@@ -21,11 +21,11 @@ body:json {
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
name:
|
||||
email:
|
||||
password:
|
||||
lastname:
|
||||
phone:
|
||||
name: test
|
||||
email: test@gmail.com
|
||||
password: 12345678
|
||||
lastname: test
|
||||
phone: 0607070707
|
||||
}
|
||||
|
||||
assert {
|
||||
|
||||
@@ -11,7 +11,7 @@ delete {
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
id:
|
||||
id: 15
|
||||
}
|
||||
|
||||
settings {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Delete user
|
||||
type: http
|
||||
seq: 8
|
||||
seq: 6
|
||||
}
|
||||
|
||||
delete {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Get User
|
||||
type: http
|
||||
seq: 3
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Modify user role
|
||||
type: http
|
||||
seq: 6
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Search users
|
||||
type: http
|
||||
seq: 12
|
||||
seq: 11
|
||||
}
|
||||
|
||||
get {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Update User
|
||||
type: http
|
||||
seq: 4
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: Validate User
|
||||
type: http
|
||||
seq: 5
|
||||
seq: 4
|
||||
}
|
||||
|
||||
post {
|
||||
@@ -11,7 +11,7 @@ post {
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
id:
|
||||
id: 13
|
||||
}
|
||||
|
||||
settings {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
meta {
|
||||
name: Users
|
||||
seq: 8
|
||||
seq: 9
|
||||
}
|
||||
|
||||
auth {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
headers {
|
||||
Accept: application/json
|
||||
X-XSRF-TOKEN: eyJpdiI6Ii9YZURUS2taQlBjVXB3azhoelpqS3c9PSIsInZhbHVlIjoiYzdpSmVhVWlZRnlvVWR1RWlHbEtwcUp5R1dQNUJXckFTRm9Tb0xYcGszdmZNb0p4NTFDM2tBMEZjTkdqYWlnSmRWZi9LdFgyczJZam1DdUVUcW84TXBOaDRmU1g5c2pseDVKMW50eTJGd3cxd3p5RjV2b2pGOGNwYzlmWDFkREkiLCJtYWMiOiI5NDY1YWM3YmE0ZDgyNWMxZDQwNTRiZWIxNWU3OTA0NjYxNDkxMjRmZmVkOTA1Y2U3YTE2ZGY2YWViYWE2ZmRjIiwidGFnIjoiIn0=
|
||||
X-XSRF-TOKEN: eyJpdiI6ImhRZnBQM1N5RFQ4L0duVm5wMEdHcUE9PSIsInZhbHVlIjoiSXFYdGt6Uk1vRUNmYnpnRXNXMVpzeW5sWTlBaW1yRmsvWG9pR01JQnYyTzNvclpoaVZZUkgwL2VYWlBjaEYzcDVnUXprUnBFa3dVL09nTVphQUhsTEtENjhjbUFoRzB0RkMzenRleit1SXVWQWFqNTgwSWFMZ0RuNHNtenpDQ1ciLCJtYWMiOiJmMDM4YjVhMDAzNjE0Y2VlZTY0NDA2YTY5ZWRmYjExZTRkYzlhNmIzMWNmNjcyMmIxYTg0YjFhNWUxZDZlMDM1IiwidGFnIjoiIn0=
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
meta {
|
||||
name: me
|
||||
type: http
|
||||
seq: 5
|
||||
seq: 6
|
||||
}
|
||||
|
||||
get {
|
||||
|
||||
Reference in New Issue
Block a user