update
This commit is contained in:
@@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user