-
Notifications
You must be signed in to change notification settings - Fork 0
Users_get
Luigi Minardi edited this page Mar 3, 2022
·
2 revisions
Return all the users of the database.
After being logged in, go to the endpoint and you'll get the response.
If you're using postman or insomnia to check the API remember to put the token of the logged user on the
header
, asAuthorization: Bearer <token>
.
[
{
"id": 1,
"name": "Adult",
"age": 20,
"surname": "User",
"email": "adult@gmail.com",
"nickname": "adult",
"password": "$2b$10$ehA1HQZhz4k6cls.7iUb4.fzCPbGiD37/CPtPmKPTNDejcuWuXNXq",
"isAdmin": true,
"createdAt": "2022-02-26T20:12:57.000Z",
"updatedAt": "2022-02-26T20:14:11.000Z"
},
{
"id": 2,
"name": "Underage",
"age": 7,
"surname": "User",
"email": "kid@gmail.com",
"nickname": "kid",
"password": "$2b$10$4hmHZZ5cRarCMU7Vsvxtx.MPYjV0LB7YJXnAK.28jvsXfOyH7SaFS",
"isAdmin": false,
"createdAt": "2022-02-26T20:18:37.000Z",
"updatedAt": "2022-02-26T20:18:37.000Z"
}
]
Return the user with the passed pk.
After being logged in, go to the endpoint and you'll get the response.
If you're using postman or insomnia to check the API remember to put the token of the logged user on the
header
, asAuthorization: Bearer <token>
.
{
"id": 1,
"name": "Adult",
"age": 20,
"surname": "User",
"email": "adult@gmail.com",
"nickname": "adult",
"password": "$2b$10$ehA1HQZhz4k6cls.7iUb4.fzCPbGiD37/CPtPmKPTNDejcuWuXNXq",
"isAdmin": true,
"createdAt": "2022-02-26T20:12:57.000Z",
"updatedAt": "2022-02-26T20:14:11.000Z"
}