run mongo via docker and start app
curl --location --request POST 'http://localhost:4000/auth/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"userName": "MyNewUser",
"password": "123456"
}'
Logging In and Fetching Token
curl --location --request POST 'http://localhost:4000/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"userName": "Admin",
"password": "123456"
}'
curl --location --request GET 'http://localhost:4000/user/61ef1a7eef3a61bd3a51602e' \
--header 'Authorization: Bearer **INSERT_TOKEN_HERE**' \
curl --location --request PATCH 'http://localhost:4000/user/61ef1a7eef3a61bd3a51602e' \
--header 'Authorization: Bearer **INSERT_TOKEN_HERE**' \
--header 'Content-Type: application/json' \
--data-raw '{
"userName": "newName"
}'
curl --location --request GET 'http://localhost:4000/user/61ef1a7eef3a61bd3a51602e' \
--header 'Authorization: Bearer **INSERT_TOKEN_HERE**' \
- Supervisor/123456
- Admin/123456
- Employee/123456