mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 22:04:53 +00:00
Refactor filtering logic in UnitService
This commit is contained in:
@ -117,8 +117,9 @@ export class UnitService {
|
||||
(child) =>
|
||||
child.spaceType.type !== 'unit' &&
|
||||
child.spaceType.type !== 'floor' &&
|
||||
child.spaceType.type !== 'community',
|
||||
) // Filter remaining unit and floor and community types
|
||||
child.spaceType.type !== 'community' &&
|
||||
child.spaceType.type !== 'unit',
|
||||
) // Filter remaining unit and floor and community and unit types
|
||||
.map((child) => ({
|
||||
uuid: child.uuid,
|
||||
name: child.spaceName,
|
||||
@ -132,8 +133,9 @@ export class UnitService {
|
||||
(child) =>
|
||||
child.spaceType.type !== 'unit' &&
|
||||
child.spaceType.type !== 'floor' &&
|
||||
child.spaceType.type !== 'community',
|
||||
) // Filter remaining unit and floor and community types
|
||||
child.spaceType.type !== 'community' &&
|
||||
child.spaceType.type !== 'unit',
|
||||
) // Filter remaining unit and floor and community and unit types
|
||||
.map(async (child) => ({
|
||||
uuid: child.uuid,
|
||||
name: child.spaceName,
|
||||
|
||||
Reference in New Issue
Block a user