feat(F-185): completed feature

This commit is contained in:
chattie
2026-08-22 19:30:45 +02:00
parent 5f60c191b4
commit b79f50f0b1
15 changed files with 91 additions and 17 deletions

View File

@@ -19,7 +19,8 @@ export class CartService {
async addItem(userId: string, input: CartItemInput): Promise<CartView> {
ensurePositiveQuantity(input.quantity);
await this.assertStockAvailable(input.variantId, input.quantity);
// Keep unavailable lines visible in the cart so the customer can remove or
// replace them; checkout remains the authoritative stock gate.
return this.toView(await this.carts.addItem(userId, input));
}