mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 17:24:54 +00:00
Add query parameter to filter spaces with devices
This commit is contained in:
@ -9,6 +9,7 @@ import {
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { AddSpaceDto, CommunitySpaceParam, UpdateSpaceDto } from '../dtos';
|
||||
@ -16,6 +17,7 @@ import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
||||
import { GetSpaceParam } from '../dtos/get.space.param';
|
||||
import { PermissionsGuard } from 'src/guards/permissions.guard';
|
||||
import { Permissions } from 'src/decorators/permissions.decorator';
|
||||
import { GetSpaceDto } from '../dtos/get.space.dto';
|
||||
|
||||
@ApiTags('Space Module')
|
||||
@Controller({
|
||||
@ -55,8 +57,12 @@ export class SpaceController {
|
||||
@Get()
|
||||
async getHierarchy(
|
||||
@Param() params: CommunitySpaceParam,
|
||||
@Query() getSpaceDto: GetSpaceDto,
|
||||
): Promise<BaseResponseDto> {
|
||||
return this.spaceService.getSpacesHierarchyForCommunity(params);
|
||||
return this.spaceService.getSpacesHierarchyForCommunity(
|
||||
params,
|
||||
getSpaceDto,
|
||||
);
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
|
||||
Reference in New Issue
Block a user