First working API.
Simple auth by creating sessions and storing in db
This commit is contained in:
18
http/auth.http
Normal file
18
http/auth.http
Normal 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"
|
||||
}
|
5
http/http-client.env.json
Normal file
5
http/http-client.env.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dev": {
|
||||
"baseurl": "http://localhost:8000"
|
||||
}
|
||||
}
|
5
http/reservation.http
Normal file
5
http/reservation.http
Normal file
@ -0,0 +1,5 @@
|
||||
### List of all reservations
|
||||
GET {{baseurl}}/reservation
|
||||
|
||||
### GET A specific reservation
|
||||
GET {{baseurl}}/reservation/1
|
Reference in New Issue
Block a user