chore: add company request

This commit is contained in:
Mahyargdz
2025-05-19 14:22:41 +03:30
parent 7d0abbeac0
commit f755a3343a
27 changed files with 480 additions and 105 deletions
@@ -4,7 +4,7 @@ import { BusinessMessage } from "../../../common/enums/message.enum";
import { BusinessRepository } from "../repositories/business.repository";
@Injectable()
export class BusinessService {
export class BusinessesService {
constructor(private readonly businessRepository: BusinessRepository) {}
async getBusinessByDanakSubscriptionId(danakSubscriptionId: string) {
@@ -13,4 +13,11 @@ export class BusinessService {
return business;
}
async getBusinessBySlug(slug: string) {
const business = await this.businessRepository.findOne({ slug, deletedAt: null });
if (!business) throw new BadRequestException(BusinessMessage.NOT_FOUND);
return { business };
}
}