http://http://localhost:8080/products http://http://localhost:8080/realTimeProducts
THUNDER CLIENT
βπ΄ βPRODUCTS βπ΄β π
GET: localhost:8080/api/products βοΈβ localhost:8080/api/products/66847f6a759177a349befc64 βοΈβ localhost:8080/api/products?page=2 βοΈβ localhost:8080/api/products?category=verduleria βοΈβ localhost:8080/api/products?sort=asc βοΈβ localhost:8080/api/products?sort=desc βοΈβ
PUT: localhost:8080/api/products/668dbe2325eaf137d0a307c4 βοΈβ ''' { "code": "BER825", "price": 2800 }
POST localhost:8080/api/products βοΈβ ''' { "title": "Zapallitos ", "description": "redondos", "code": "za723", "price": 2800, "stock": 6, "category": "verduleria", "thumbnails": ["zapallito.jpg"] }'''
DELETE localhost:8080/api/products/668dbcf025eaf137d0a307bc βοΈβ
π CART π
GET βοΈβ TRAER TODOS LOS PRODUCTOS: localhost:8080/api/cart βοΈβ βοΈβ BUSCAR UN CARRITO POR ID + POPULATE: localhost:8080/api/cart/cid βοΈβ
POST βοΈβ CREACIΓN DEL CARRITO: localhost:8080/api/cart βοΈβ AGREGAR UN PRODUCTO AL CARRITO: localhost:8080/api/cart/66870a18053bc6eb7606fac2/product/668478d144426e96d2951c73
PUT βοΈβ Actualizar QUANTITY: localhost:8080/api/cart/66870a18053bc6eb7606fac2/product/66847f6a759177a349befc64 { "quantity": 9 }
βοΈ AGREGAR UN PROD POR BODY & VACIAR EL CARRITO POR BODY: localhost:8080/api/cart/66870a18053bc6eb7606fac2 ''' { "$push": { "products": { "product": "66847f6a759177a349befc64", "quantity": 3
}
}
}
{
"$set": {
"products": []
}
}'''
β DELETE
βοΈ ELIMINAR UN CARRITO: localhost:8080/api/cart/668dc26225eaf137d0a307d3
βοΈ VACIAR UN CARRITO: localhost:8080/api/cart/6687297f1d15b075804b605d/clear
βοΈ ELIMINAR UN PRODUCTO DEL CARRITO: localhost:8080/api/cart/6687297f1d15b075804b605d/product/66847f6a759177a349befc64