mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 17:24:54 +00:00
Fixed scene
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
export * from './space.controller';
|
||||
export * from './space-user.controller';
|
||||
export * from './space-device.controller';
|
||||
export * from './space-scene.controller';
|
||||
export * from './subspace';
|
||||
|
||||
34
src/space/controllers/space-scene.controller.ts
Normal file
34
src/space/controllers/space-scene.controller.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
||||
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
||||
import { Controller, Get, Param, Query, UseGuards } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { SpaceSceneService } from '../services';
|
||||
import { GetSceneDto } from '../../scene/dtos';
|
||||
import { GetSpaceParam } from '../dtos';
|
||||
|
||||
@ApiTags('Space Module')
|
||||
@Controller({
|
||||
version: '1',
|
||||
path: ControllerRoute.SPACE_SCENE.ROUTE,
|
||||
})
|
||||
export class SpaceSceneController {
|
||||
constructor(private readonly sceneService: SpaceSceneService) {}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiOperation({
|
||||
summary:
|
||||
ControllerRoute.SPACE_SCENE.ACTIONS.GET_TAP_TO_RUN_SCENE_BY_SPACE_SUMMARY,
|
||||
description:
|
||||
ControllerRoute.SPACE_SCENE.ACTIONS
|
||||
.GET_TAP_TO_RUN_SCENE_BY_SPACE_DESCRIPTION,
|
||||
})
|
||||
@Get()
|
||||
async getTapToRunSceneByUnit(
|
||||
@Param() params: GetSpaceParam,
|
||||
@Query() inHomePage: GetSceneDto,
|
||||
): Promise<BaseResponseDto> {
|
||||
return await this.sceneService.getScenes(params, inHomePage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user