chore: add create customer and update customer for admin

This commit is contained in:
mahyargdz
2025-03-06 09:35:59 +03:30
parent c1f21e75f2
commit b92a65c22c
20 changed files with 674 additions and 399 deletions
@@ -45,6 +45,16 @@ export class DanakServicesService {
}
/******************************************** */
async getCategoryById(categoryId: string) {
const category = await this.danakServicesCategoryRepository.findOneById(categoryId);
if (!category) throw new BadRequestException(CategoryMessage.CATEGORY_NOT_EXIST);
return {
category,
};
}
/******************************************** */
async updateCategory(categoryId: string, updateDto: UpdateCategoryDto) {
const category = await this.danakServicesCategoryRepository.findOneById(categoryId);
if (!category) throw new BadRequestException(CategoryMessage.CATEGORY_NOT_EXIST);