@@ -52,7 +52,8 @@ export class PricingService {
|
||||
if (existType) throw new BadRequestError(PricingMessage.TypeIsExist);
|
||||
|
||||
const pricing = await this.pricingRepo.model.findByIdAndUpdate(id, updateDto, { new: true });
|
||||
if (pricing) throw new BadRequestError(PricingMessage.NotFound);
|
||||
|
||||
if (!pricing) throw new BadRequestError(PricingMessage.NotFound);
|
||||
return {
|
||||
pricing,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user