This commit is contained in:
mahyargdz
2025-04-17 09:52:54 +03:30
parent 999ce9cee2
commit f9cb3cf653
12 changed files with 520 additions and 322 deletions
@@ -385,7 +385,9 @@ export class DanakServicesService {
async getDanakServiceByIdPublic(serviceId: string) {
const danakService = await this.danakServicesRepository.getDanakServiceById(serviceId, false);
if (!danakService) throw new BadRequestException(ServiceMessage.SERVICE_NOT_FOUND_BY_ID);
return { danakService };
const averageRating = await this.danakServiceReviewRepository.getAverageRating(danakService.id);
return { danakService, averageRating };
}
/******************************************** */