disable cache in cart
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-06-05 17:36:47 +03:30
parent 02ebdf83b6
commit 66413f4ce1
@@ -1,4 +1,4 @@
import { Controller, Get, Post, Body, Patch, Delete, UseGuards, Param } from '@nestjs/common'; import { Controller, Get, Post, Body, Patch, Delete, UseGuards, Param, Header } from '@nestjs/common';
import { CartService } from '../providers/cart.service'; import { CartService } from '../providers/cart.service';
import { BulkAddItemsToCartDto } from '../dto/bulk-add-items.dto'; import { BulkAddItemsToCartDto } from '../dto/bulk-add-items.dto';
import { ApplyCouponDto } from '../dto/apply-coupon.dto'; import { ApplyCouponDto } from '../dto/apply-coupon.dto';
@@ -17,6 +17,9 @@ export class CartController {
constructor(private readonly cartService: CartService) {} constructor(private readonly cartService: CartService) {}
@Get() @Get()
@Header('Cache-Control', 'no-store, no-cache, must-revalidate')
@Header('Pragma', 'no-cache')
@Header('Expires', '0')
@ApiOperation({ summary: 'Get cart for current user and restaurant' }) @ApiOperation({ summary: 'Get cart for current user and restaurant' })
@ApiHeader(API_HEADER_SLUG) @ApiHeader(API_HEADER_SLUG)
async findOne(@UserId() userId: string, @RestId() restaurantId: string) { async findOne(@UserId() userId: string, @RestId() restaurantId: string) {