|
|
|
|
|
|
|
# ORDER
|
|
|
|
### Historico de pedidos
|
|
|
|
### POST /order/
|
|
|
|
Adiciona historico dos pedidos
|
|
|
|
````javascript
|
|
|
|
{
|
|
|
|
"userId" : "5aecc1e68c879d2adf444db6",
|
|
|
|
"supplierId" : "5ab94945d0032b2d949634d8"
|
|
|
|
}
|
|
|
|
````
|
|
|
|
|
|
|
|
### GET /order/all?populate=true
|
|
|
|
?populate=true => facultativo, retorna, apenas sem isso
|
|
|
|
retorna historico dos pedidos
|
|
|
|
`
|
|
|
|
|
|
|
|
### POST /order/
|
|
|
|
Adiciona historico dos pedidos
|
|
|
|
````javascript
|
|
|
|
{
|
|
|
|
"userId" : "5aecc1e68c879d2adf444db6",
|
|
|
|
"supplierId" : "5ab94945d0032b2d949634d8"
|
|
|
|
}
|
|
|
|
````
|
|
# SUPPLIER
|
|
# SUPPLIER
|
|
|
|
### POST /supplier/
|
|
|
|
Adiciona supplier
|
|
|
|
````javascript
|
|
|
|
{
|
|
|
|
name: {type: String, required: true},
|
|
|
|
phone: {type: String, required: true},
|
|
|
|
}
|
|
|
|
````
|
|
|
|
|
|
### GET /supplier/all
|
|
### GET /supplier/all
|
|
retorna json com todos os fornecedores
|
|
retorna json com todos os fornecedores
|
|
|
|
|
... | @@ -22,6 +56,27 @@ Adiciona user |
... | @@ -22,6 +56,27 @@ Adiciona user |
|
}
|
|
}
|
|
````
|
|
````
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### POST /user/fav
|
|
|
|
Adiciona supplier favortos
|
|
|
|
````javascript
|
|
|
|
{
|
|
|
|
"supplierId": "5ab94945d0032b2d949634d8" //objectID
|
|
|
|
}
|
|
|
|
````
|
|
|
|
|
|
|
|
### DELETE /user/fav
|
|
|
|
remove supplier favortos
|
|
|
|
````javascript
|
|
|
|
{
|
|
|
|
"supplierId": "5ab94945d0032b2d949634d8"
|
|
|
|
}
|
|
|
|
````
|
|
|
|
|
|
|
|
### GET /user/fav
|
|
|
|
retorna supplier favortos
|
|
|
|
|
|
# LOGIN
|
|
# LOGIN
|
|
### POST /login/
|
|
### POST /login/
|
|
Efetua login
|
|
Efetua login
|
... | | ... | |