feat: add get brand detail

This commit is contained in:
morteza-mortezai
2025-09-28 11:20:03 +03:30
parent 7e344fd695
commit 521533dd04
2 changed files with 20 additions and 1 deletions
+9
View File
@@ -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 };