summary refs log tree commit diff
path: root/endpoints.http
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-06-02 10:12:34 +0200
committerRory& <root@rory.gay>2025-06-02 10:12:34 +0200
commitc4fd9c93a63bce7c322aec1fc304b4dc5ac5a9cd (patch)
tree4cea31f08115376fefc2cdfed5befbc5610150f8 /endpoints.http
parentAdd shortcut for generating http file, part of API documentation (diff)
downloadnodejs-final-assignment-c4fd9c93a63bce7c322aec1fc304b4dc5ac5a9cd.tar.xz
Split authentication and authorization
Diffstat (limited to 'endpoints.http')
-rw-r--r--endpoints.http16
1 files changed, 16 insertions, 0 deletions
diff --git a/endpoints.http b/endpoints.http

index b9a1238..aab693a 100644 --- a/endpoints.http +++ b/endpoints.http
@@ -1,11 +1,21 @@ +@baseUrl=http://localhost:3000 +@username=admin +@password=admin +@email=admin@example.com +@userType=admin + GET {{baseUrl}}/budget/:id/add HTTP/1.1 ### +# Get all users (raw) GET {{baseUrl}}/admin/users HTTP/1.1 +Authorization: Bearer {{accessToken}} ### +# Get a user (raw) GET {{baseUrl}}/admin/user/:id HTTP/1.1 +Authorization: Bearer {{accessToken}} ### DELETE {{baseUrl}}/admin/user/:id HTTP/1.1 @@ -50,6 +60,7 @@ GET {{baseUrl}}/budget/@me HTTP/1.1 GET {{baseUrl}}/auth/devices HTTP/1.1 ### +# Get the index page (empty) GET {{baseUrl}}/ HTTP/1.1 ### @@ -83,6 +94,11 @@ Content-Type: application/json ### +# Get the server status GET {{baseUrl}}/status HTTP/1.1 ### +# Get current user +GET {{baseUrl}}/auth/whoami HTTP/1.1 + +###