-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterceraEntrega.txt
72 lines (58 loc) · 1.43 KB
/
terceraEntrega.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
objetos mínimos a pasar por los endpoints
POST
http://localhost:8080/api/login/register
{
"name": "hola",
"email": "[email protected]",
"password": "123456789",
"passwordConfirmation": "123456789",
"tel": "1126369364"
}
Desde el front
http://localhost:8080/admin/register
POST
http://localhost:8080/api/login/auth
{
"email": "[email protected]",
"password": "123456789"
}
Devuelve el id del carrito y el id del usuario
POST
http://localhost:8080/api/carrito/agregar
Agrega de a una unidad
{
"_id": "6195cf783e680e2461cc4d8d",
"user": "61924f8b74ebb19a086840d0",
"producto": {
"_id": "614a81044110e52a0702bf81",
"nombre": "OsobucoModif",
"descripcion": "Descripcion osobuco",
"codigo": "Oso",
"foto": "foto",
"precio": 50,
"stock": 10,
"timestamp": "Tue Sep 21 2021 22:04:04 GMT-0300 (hora estándar de Argentina)"
}
}
Con lo que devuelve del endpoint, se pasa al checkout
POST
checkout
{
"_id": "6195ddd37baeadaab834e038",
"user": "619131a484829786020660ae",
"timestamp": "2021-11-18-02-00-03-AM",
"producto": [
{
"_id": "614a81044110e52a0702bf81",
"nombre": "OsobucoModif",
"descripcion": "Descripcion osobuco",
"codigo": "Oso",
"foto": "foto",
"precio": 50,
"cantidad": 3,
"timestamp": "2021-11-18-02-03-42-AM"
}
],
"abierto": true
}
http://tercera-pre.herokuapp.com/