This commit is contained in:
2026-06-07 15:25:04 +03:30
parent 968b12c4ff
commit e915af91d8
2 changed files with 2 additions and 9 deletions
+2 -2
View File
@@ -72,7 +72,7 @@ export class BusinessService {
}
async findBySlugOrFail(slug: string) {
const business = await this.businessRepository.findOne({ slug })
const business = await this.businessRepository.findOne({ slug }, { fields: ['id', 'name', 'slug'] })
if (!business) {
throw new NotFoundException("Business not found")
}
@@ -96,7 +96,7 @@ export class BusinessService {
}
async update(id: string, dto: UpdateBusinessDto) {
const business = await this.findByIdOrFail(id)
const business = await this.findByIdOrFail(id)
if (dto.slug) {
const existing = await this.businessRepository.findOne({ slug: dto.slug, id: { $not: id } })
@@ -153,11 +153,4 @@ export class DesignRequestService {
return designRequest;
}
update(id: number, updateDesignRequestDto: UpdateDesignRequestDto) {
return `This action updates a #${id} designRequest`;
}
remove(id: number) {
return `This action removes a #${id} designRequest`;
}
}