Add user GET endpoint, schemas, and security middlewares
Introduces GET /users/:id endpoint with validation schema, adds tests for user and register routes, and applies security middlewares (helmet, hpp, cors) to the server. Also adds ESLint configuration and updates logger with linting comments.
This commit is contained in:
8
tests/register.rest
Normal file
8
tests/register.rest
Normal file
@@ -0,0 +1,8 @@
|
||||
POST http://localhost:3000/register HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"email": "johndoe@exemple.com",
|
||||
"username": "johndoe",
|
||||
"password": "Password123"
|
||||
}
|
||||
2
tests/users/id.rest
Normal file
2
tests/users/id.rest
Normal file
@@ -0,0 +1,2 @@
|
||||
GET http://localhost:3000/users/johndoe HTTP/1.1
|
||||
authorization: Bearer token
|
||||
Reference in New Issue
Block a user