set delivery
This commit is contained in:
@@ -5,6 +5,7 @@ import { UpdateItemQuantityDto } from '../dto/update-item.dto';
|
||||
import { ApplyCouponDto } from '../dto/apply-coupon.dto';
|
||||
import { SetAddressDto } from '../dto/set-address.dto';
|
||||
import { SetPaymentMethodDto } from '../dto/set-payment-method.dto';
|
||||
import { SetDeliveryMethodDto } from '../dto/set-delivery-method.dto';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiBearerAuth, ApiBody, ApiParam } from '@nestjs/swagger';
|
||||
import { AuthGuard } from '../../auth/guards/auth.guard';
|
||||
import { UserId } from 'src/common/decorators/user-id.decorator';
|
||||
@@ -129,4 +130,15 @@ export class CartController {
|
||||
) {
|
||||
return this.cartService.setPaymentMethod(userId, restaurantId, setPaymentMethodDto);
|
||||
}
|
||||
|
||||
@Patch('delivery-method')
|
||||
@ApiOperation({ summary: 'Set delivery method for cart' })
|
||||
@ApiBody({ type: SetDeliveryMethodDto })
|
||||
setDeliveryMethod(
|
||||
@UserId() userId: string,
|
||||
@RestId() restaurantId: string,
|
||||
@Body() setDeliveryMethodDto: SetDeliveryMethodDto,
|
||||
) {
|
||||
return this.cartService.setDeliveryMethod(userId, restaurantId, setDeliveryMethodDto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user