cart all
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user