Loading backend/src/admin/admin.service.ts +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ export class AdminService { @InjectRepository(Town) private townRepository: Repository<Town>, ) {} async create(createAdminDto: CreateAdminDto) { const town = await this.townRepository.findOneByOrFail({ townId: createAdminDto.idTown }); const town = await this.townRepository.findOneBy({ townId: createAdminDto.idTown }); await this.adminRepository.insert({ ...createAdminDto, idTown: town }); } Loading Loading
backend/src/admin/admin.service.ts +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ export class AdminService { @InjectRepository(Town) private townRepository: Repository<Town>, ) {} async create(createAdminDto: CreateAdminDto) { const town = await this.townRepository.findOneByOrFail({ townId: createAdminDto.idTown }); const town = await this.townRepository.findOneBy({ townId: createAdminDto.idTown }); await this.adminRepository.insert({ ...createAdminDto, idTown: town }); } Loading