First working API.

Simple auth by creating sessions and storing in db
This commit is contained in:
Martin Berg Alstad
2024-08-29 16:43:04 +02:00
commit 5d5e6393ac
50 changed files with 6410 additions and 0 deletions

18
http/auth.http Normal file
View File

@ -0,0 +1,18 @@
### Register a new user
POST {{baseurl}}/auth/register
Content-Type: application/json
{
"email": "test@test.com",
"password": "password",
"role": "ADMIN"
}
### Login
POST {{baseurl}}/auth/login
Content-Type: application/json
{
"email": "test@test.com",
"password": "password"
}

View File

@ -0,0 +1,5 @@
{
"dev": {
"baseurl": "http://localhost:8000"
}
}

5
http/reservation.http Normal file
View File

@ -0,0 +1,5 @@
### List of all reservations
GET {{baseurl}}/reservation
### GET A specific reservation
GET {{baseurl}}/reservation/1