Raesquiv13 / gpos-System

Sistema de punto de venta
1 stars 0 forks source link

Create an API to get the list of products by user #14

Closed Raesquiv13 closed 4 years ago

Raesquiv13 commented 4 years ago

As the product owner, I want to:

Create an API that implement the token authorization in its headers, the value for authorization is going to be the Token, with the token you can extract the id of the user and request about user information.

API: Verb: GET URL: /api/private/products/

HEADERS: authorization: "Bearer "+token

response status: 200 body

{ "price": 0, "category": "", "_id": "", "userOwner": "" "name": "", "picture": "", "description": "", "__v": 0 }

error status: 500 message: Error al realizar la petición

status: 404 message: El producto no existe

Raesquiv13 commented 4 years ago

Test case

Creation https://gpossystem.testrail.io/index.php?/cases/view/26

Execution https://gpossystem.testrail.io/index.php?/tests/view/22&group_by=cases:section_id&group_order=asc&group_id=3