rename
This commit is contained in:
@@ -8,7 +8,7 @@ import { ShopRepository } from '../repositories/rest.repository';
|
||||
import { RestMessage } from 'src/common/enums/message.enum';
|
||||
import { FindRestaurantsDto } from '../dto/find-shops.dto';
|
||||
import { PaginatedResult } from 'src/common/interfaces/pagination.interface';
|
||||
import { Admin } from '../../admin/entities/admin.entity';
|
||||
import { Admin } from '../../admin/entities/admin.entity';
|
||||
import { AdminRole } from '../../admin/entities/adminRole.entity';
|
||||
import { Role } from '../../roles/entities/role.entity';
|
||||
import { normalizePhone } from 'src/modules/utils/phone.util';
|
||||
@@ -62,7 +62,7 @@ export class ShopService {
|
||||
subscriptionStartDate: dto.subscriptionStartDate,
|
||||
});
|
||||
|
||||
const role = await em.findOne(Role, { isSystem:true });
|
||||
const role = await em.findOne(Role, { isSystem: true });
|
||||
if (!role) {
|
||||
throw new BadRequestException(`System role not found`);
|
||||
}
|
||||
@@ -219,7 +219,7 @@ export class ShopService {
|
||||
await em.nativeDelete(Delivery, { shop: id });
|
||||
|
||||
// Delete schedules
|
||||
await em.nativeDelete(Schedule, { restId: id });
|
||||
await em.nativeDelete(Schedule, { shopId: id });
|
||||
|
||||
// Delete notification preferences
|
||||
await em.nativeDelete(NotificationPreference, { shop: id });
|
||||
|
||||
Reference in New Issue
Block a user