feat: add filter on endpoint product all
This commit is contained in:
@@ -199,4 +199,24 @@ export class SupplierService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async findByActiveAll() {
|
||||
try {
|
||||
return await this.supplierRepository.find({
|
||||
status: true,
|
||||
});
|
||||
} catch (e) {
|
||||
if (e instanceof EntityNotFoundError) {
|
||||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'Supplier Data not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user