refactor: move backend in apps/backend

This commit is contained in:
Giovanni committed 2026-10-03 18:35:36 +02:00
1 parent cf529278bd
commit e2b471312c
178 files changed
+210 -193

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
meta {
name: Create event
type: http
seq: 1
}
post {
url: {{url}}/api/events/create
body: json
auth: inherit
}
body:json {
{
"name": "{{name}}",
"description": "{{description}}",
"start": "{{start}}",
"end": "{{end}}"
}
}
vars:pre-request {
name: Plage
description: La rochelle
start: 2025-01-15T13:45
end: 2025-03-15T13:00
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
docs {
# /events/create -- POST
Permet de créer un événement.
La connexion est obligatoire, les cookies de connexions/XSRF doivent être présents.
L'utilisateur doit être admin pour créer un événement
Entrée: nom, description
}
+24
View File
@@ -0,0 +1,24 @@
meta {
name: Delete event
type: http
seq: 6
}
delete {
url: {{url}}/api/events/{{id}}
body: none
auth: inherit
}
vars:pre-request {
id: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+20
View File
@@ -0,0 +1,20 @@
meta {
name: Get all events
type: http
seq: 5
}
get {
url: {{url}}/api/events
body: none
auth: inherit
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+24
View File
@@ -0,0 +1,24 @@
meta {
name: Get event tasks
type: http
seq: 3
}
get {
url: {{url}}/api/events/{{id}}/tasks
body: none
auth: inherit
}
vars:pre-request {
id: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+24
View File
@@ -0,0 +1,24 @@
meta {
name: Get event
type: http
seq: 7
}
get {
url: {{url}}/api/events/{{id}}
body: none
auth: inherit
}
vars:pre-request {
id: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+24
View File
@@ -0,0 +1,24 @@
meta {
name: Search events
type: http
seq: 8
}
get {
url: {{url}}/api/events/search
body: none
auth: inherit
}
params:query {
query: vile
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+33
View File
@@ -0,0 +1,33 @@
meta {
name: Update event
type: http
seq: 4
}
post {
url: {{url}}/api/events/{{id}}/update
body: json
auth: inherit
}
body:json {
{
"name": "{{name}}",
"description": "{{description}}"
}
}
vars:pre-request {
id: 1
name: BLAAHHHH
description: DADADADADDA
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+8
View File
@@ -0,0 +1,8 @@
meta {
name: Events
seq: 7
}
auth {
mode: inherit
}
+31
View File
@@ -0,0 +1,31 @@
meta {
name: Assign task to user
type: http
seq: 3
}
post {
url: {{url}}/api/events/task/assign/{{id}}
body: json
auth: inherit
}
body:json {
{
"task_id": "{{task_id}}"
}
}
vars:pre-request {
id: 3
task_id: 2
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+30
View File
@@ -0,0 +1,30 @@
meta {
name: Assign task
type: http
seq: 2
}
post {
url: {{url}}/api/events/task/assign
body: json
auth: inherit
}
body:json {
{
"task_id": "{{taskId}}"
}
}
vars:pre-request {
taskId: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+24
View File
@@ -0,0 +1,24 @@
meta {
name: Delete task
type: http
seq: 8
}
delete {
url: {{url}}/api/events/tasks/{{id}}
body: none
auth: inherit
}
vars:pre-request {
id: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+34
View File
@@ -0,0 +1,34 @@
meta {
name: Is user assigned
type: http
seq: 9
}
get {
url: {{url}}/api/events/tasks/{{id}}/assigned
body: none
auth: inherit
}
vars:pre-request {
id: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
docs {
# /events/tasks/{id}/assigned -- GET
Vérifie si l'utilisateur connecté est assigné à une tâche spécifique.
Authentification requise.
Entrée: id (identifiant de la tâche)
}
+31
View File
@@ -0,0 +1,31 @@
meta {
name: Unassign task to user
type: http
seq: 7
}
post {
url: {{url}}/api/events/task/unassign/{{id}}
body: json
auth: inherit
}
body:json {
{
"task_id": "{{task_id}}"
}
}
vars:pre-request {
id: 3
task_id: 2
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+30
View File
@@ -0,0 +1,30 @@
meta {
name: Unassign task
type: http
seq: 6
}
post {
url: {{url}}/api/events/task/unassign
body: json
auth: inherit
}
body:json {
{
"task_id": "{{taskId}}"
}
}
vars:pre-request {
taskId: 1
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+41
View File
@@ -0,0 +1,41 @@
meta {
name: Update Task
type: http
seq: 5
}
post {
url: {{url}}/api/events/tasks/{{id}}/update
body: json
auth: inherit
}
body:json {
{
"name": "{{name}}",
"description": "{{description}}",
"location": "{{location}}",
"start": "{{start}}",
"end": "{{end}}",
"max_participants": "{{max_participants}}"
}
}
vars:pre-request {
id: 1
name: Organisation plage
description: il faut organiser la sortie
location: La Rochelle
start: 2025-01-15T13:45
end: 2025-03-15T13:00
max_participants: 5
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+42
View File
@@ -0,0 +1,42 @@
meta {
name: create event task
type: http
seq: 1
}
post {
url: {{url}}/api/events/task
body: json
auth: inherit
}
body:json {
{
"event_id": "{{event_id}}",
"name": "{{name}}",
"location": "{{location}}",
"description": "{{description}}",
"start": "{{start}}",
"end": "{{end}}",
"max_participants": "{{max_participants}}"
}
}
vars:pre-request {
event_id: 1
name: Organisation plage
location: la rochelle
description: il faut organiser la sortie
start: 2025-01-15T13:45
end: 2025-03-15T13:00
max_participants: 5
}
assert {
res.status: eq 200
}
settings {
encodeUrl: true
timeout: 0
}
+8
View File
@@ -0,0 +1,8 @@
meta {
name: tasks
seq: 2
}
auth {
mode: inherit
}