mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 19:04:54 +00:00
Refactor unit service to remove unnecessary includeSubSpaces parameter
This commit is contained in:
@ -79,7 +79,7 @@ export class UnitService {
|
||||
getUnitChildDto: GetUnitChildDto,
|
||||
): Promise<UnitChildInterface> {
|
||||
try {
|
||||
const { includeSubSpaces, page, pageSize } = getUnitChildDto;
|
||||
const { page, pageSize } = getUnitChildDto;
|
||||
|
||||
const space = await this.spaceRepository.findOneOrFail({
|
||||
where: { uuid: unitUuid },
|
||||
@ -94,12 +94,7 @@ export class UnitService {
|
||||
where: { parent: { uuid: space.uuid } },
|
||||
});
|
||||
|
||||
const children = await this.buildHierarchy(
|
||||
space,
|
||||
includeSubSpaces,
|
||||
page,
|
||||
pageSize,
|
||||
);
|
||||
const children = await this.buildHierarchy(space, false, page, pageSize);
|
||||
|
||||
return {
|
||||
uuid: space.uuid,
|
||||
|
||||
Reference in New Issue
Block a user