Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Dec 14, 2023
1 parent ffc7d4f commit 2ed0731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/modules/business-units/business-units.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { GetBusinessUnitTreeWithOptionsDto } from 'modules/business-units/dto/ge
import { AdminRegionsService } from 'modules/admin-regions/admin-regions.service';
import { SuppliersService } from 'modules/suppliers/suppliers.service';
import { MaterialsService } from 'modules/materials/materials.service';
import { In } from 'typeorm';

@Injectable()
export class BusinessUnitsService extends AppBaseService<
Expand Down Expand Up @@ -63,7 +64,7 @@ export class BusinessUnitsService extends AppBaseService<
}

async getBusinessUnitsById(ids: string[]): Promise<BusinessUnit[]> {
return this.businessUnitRepository.findByIds(ids);
return this.businessUnitRepository.findBy({ id: In(ids) });
}

async save(
Expand All @@ -83,7 +84,6 @@ export class BusinessUnitsService extends AppBaseService<
await this.businessUnitRepository.delete({});
}

// TODO: Implement Tree response similar to other entities as Admin-Regions
async getTrees(
businessUnitTreeOptions: GetBusinessUnitTreeWithOptionsDto,
): Promise<BusinessUnit[]> {
Expand Down

0 comments on commit 2ed0731

Please sign in to comment.