fix: pricing update

This commit is contained in:
morteza-mortezai
2025-09-30 16:39:17 +03:30
parent 527c279aad
commit 9d8addb399
+2 -1
View File
@@ -52,7 +52,8 @@ export class PricingService {
if (existType) throw new BadRequestError(PricingMessage.TypeIsExist); if (existType) throw new BadRequestError(PricingMessage.TypeIsExist);
const pricing = await this.pricingRepo.model.findByIdAndUpdate(id, updateDto, { new: true }); 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 { return {
pricing, pricing,
}; };