fix: warranty and brand detail
This commit is contained in:
@@ -62,8 +62,8 @@ class WarrantyService {
|
||||
return await this.warrantyRepo.pendingWarranties();
|
||||
}
|
||||
|
||||
async getWarranty(id: number) {
|
||||
const warranty = await this.warrantyRepo.model.findById(id);
|
||||
async getWarranty(id: string) {
|
||||
const warranty = await this.warrantyRepo.model.findOne({ _id: id, deleted: false });
|
||||
if (!warranty) throw new BadRequestError(CommonMessage.NotValidId);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user