Skip to content

Feature(api-31): Gestion Cart#84

Merged
andres15alvarez merged 8 commits into
devfrom
feature/API-31/module-cart
May 4, 2025
Merged

Feature(api-31): Gestion Cart#84
andres15alvarez merged 8 commits into
devfrom
feature/API-31/module-cart

Conversation

@CarlosDev73
Copy link
Copy Markdown
Contributor

@CarlosDev73 CarlosDev73 commented Apr 27, 2025

POST /cart => (http://localhost:3000/cart)
Con esto podremos crear un carrito
body example:
{
"items": [
{ "productPresentationId": "217c0154-4977-4563-8fe7-61834d8750f4", "quantity": 8 },
{ "productPresentationId": "110b91af-0a4a-4e62-9090-803c9ddc4649", "quantity": 5 },
{ "productPresentationId": "27f5a426-0733-4ff8-9b10-52e13d181a6d", "quantity": 3 }
]
}
image

al crearlo el carrito nos estará dando información útil al respecto como respuesta.

GET/cart => (http://localhost:3000/cart)
Este endpoint nos estara brindado la lista del carrito
image

PATCH/cart => (http://localhost:3000/cart)
En este endpoint podemos Agregar, Eliminar y Cambiar la cantidad de nuestros Items/objetos en el carrito
Ejemplifiquemos todos los escenarios.

Eliminemos un producto (Basicamente borrando el producto del body este se elimina del carrito)
image

Ahora Agregmos un producto(Basicamente agregando un producto al body este entra al carrito
image

Y por ultimo y no por ello menos importante, cambiemos la cantidad
image

Ahora si eliminamos todos los productos del carrito, EL CARRITO TAMBIEN PROCEDE A ELIMINARSE
image

Hagamos un get despues de eliminar todos los productos.
image

Como podemos observar no existe dicho carrito.

@CarlosDev73 CarlosDev73 changed the title Feat(api-31): adding entitis, module, service, controlle cart Feat(api-31): Gestion Cart Apr 27, 2025
@CarlosDev73 CarlosDev73 changed the title Feat(api-31): Gestion Cart Feature(api-31): Gestion Cart Apr 27, 2025
Comment thread src/cart/entities/cart-item.entity.ts Outdated
@CarlosDev73 CarlosDev73 marked this pull request as ready for review May 1, 2025 00:32
@andres15alvarez andres15alvarez merged commit 2dc787d into dev May 4, 2025
@andres15alvarez andres15alvarez deleted the feature/API-31/module-cart branch May 4, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants