update
This commit is contained in:
@@ -489,7 +489,7 @@ export class CartService {
|
||||
*/
|
||||
async setAddress(userId: string, restaurantId: string, setAddressDto: SetAddressDto): Promise<Cart> {
|
||||
const cart = await this.findOneOrFail(userId, restaurantId);
|
||||
|
||||
|
||||
if (!cart.deliveryMethodId) throw new BadRequestException('Delivery method must be set before setting address');
|
||||
// Find and validate address belongs to user
|
||||
const address = await this.em.findOne(UserAddress, { id: setAddressDto.addressId }, { populate: ['user'] });
|
||||
|
||||
Reference in New Issue
Block a user