mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-27 06:17:55 +00:00
added community space
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { Controller, Get, Param, UseGuards } from '@nestjs/common';
|
||||
import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger';
|
||||
import { GetCommunityParams } from '../dtos/get.community.dto';
|
||||
// import { CheckUserCommunityGuard } from 'src/guards/user.community.guard';
|
||||
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
||||
import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
||||
import { CommunitySpaceService } from '../services';
|
||||
|
||||
@ApiTags('Community Module')
|
||||
@Controller({
|
||||
version: '1',
|
||||
path: ControllerRoute.COMMUNITYSPACE.ROUTE,
|
||||
})
|
||||
export class CommunitySpaceController {
|
||||
constructor(private readonly communitySpaceService: CommunitySpaceService) {}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiOperation({
|
||||
summary:
|
||||
ControllerRoute.COMMUNITYSPACE.ACTIONS
|
||||
.GET_COMMUNITY_SPACES_HIERARCHY_SUMMARY,
|
||||
description:
|
||||
ControllerRoute.COMMUNITYSPACE.ACTIONS
|
||||
.GET_COMMUNITY_SPACES_HIERARCHY_DESCRIPTION,
|
||||
})
|
||||
@Get('/:communityId')
|
||||
async getCommunityByUuid(
|
||||
@Param() params: GetCommunityParams,
|
||||
): Promise<BaseResponseDto> {
|
||||
return await this.communitySpaceService.getSpacesHierarchyForCommunity(
|
||||
params.communityId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
||||
import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
||||
import { PaginationRequestGetListDto } from '@app/common/dto/pagination.request.dto';
|
||||
// import { CommunityPermissionGuard } from 'src/guards/community.permission.guard';
|
||||
|
||||
@ApiTags('Community Module')
|
||||
@Controller({
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * from './community.controller';
|
||||
export * from './community-spaces.controller';
|
||||
|
||||
Reference in New Issue
Block a user