This commit is contained in:
2025-12-18 10:38:52 +03:30
parent 44bce1e6d7
commit 99a81c43a1
4 changed files with 135 additions and 3 deletions
@@ -12,6 +12,7 @@ import { ApiTags, ApiOperation, ApiBearerAuth, ApiBody, ApiParam, ApiHeader } fr
import { AuthGuard } from '../../auth/guards/auth.guard';
import { UserId } from 'src/common/decorators/user-id.decorator';
import { RestId } from 'src/common/decorators/rest-id.decorator';
import { SetAllCartParmsDto } from '../dto/set-all-cart-params.dto';
const API_HEADER_SLUG = {
name: 'X-Slug',
@@ -161,4 +162,15 @@ export class CartController {
) {
return this.cartService.setCarDelivery(userId, restaurantId, setCarDeliveryDto);
}
@Patch('all')
@ApiOperation({ summary: 'Set car delivery for cart' })
@ApiHeader(API_HEADER_SLUG)
@ApiBody({ type: SetAllCartParmsDto })
setAllCartParams(
@UserId() userId: string,
@RestId() restaurantId: string,
@Body() setCarDeliveryDto: SetCarDeliveryDto,
) {
return this.cartService.setCarDelivery(userId, restaurantId, setCarDeliveryDto);
}
}