feat: add get brand detail
This commit is contained in:
@@ -117,6 +117,15 @@ class BrandService {
|
||||
async getPendingBrandsCount() {
|
||||
return await this.brandRepo.getPendingBrandsCount();
|
||||
}
|
||||
|
||||
async getBrandDetail(id: number) {
|
||||
const brand = await this.brandRepo.model.findOne({ _id: id });
|
||||
if (brand) throw new BadRequestError(BrandMessage.Exist);
|
||||
|
||||
return {
|
||||
brand,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export { BrandService };
|
||||
|
||||
Reference in New Issue
Block a user