Products CRUD, user signup and login. Application with jwt token authetication method.
Create a new product in BD. Some field are required
Request example:
headers.autentication: token *tokenAuth*
body:{
"name": "Trackpad mac",
"description": "mouse trackpad"
}
Delete a product from DB. ProductId property are required in body section.
Request example:
headers.autentication: token *tokenAuth*
body: {
"productId": "5c882bee5b0b834fbeca50ca"
}
Get all products
Create a new user in DB. Email and password are required in body section.
Request example:
body: {
"email": "[email protected]",
"password": "pass1234"
}
Aplication login endpoint. Email and password data are required in body section. When login is succesfull the request responds with tokenAuth property that must be used to authenticate in follows requests.
Request example:
body:{
"email": "[email protected]",
"password": "pass1234"
}
https://www.getpostman.com/collections/7361e018c8a0edd6c6ef
VARIABLE VALUE
token token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9....
BRP: Bad request params; U001: Error, creating user; U002: email or password incorrect; P001: Error creating product; P002: Error getting products