remove duplication code

This commit is contained in:
faris Aljohari
2024-11-20 00:34:12 -06:00
parent 1fe5ba70b9
commit 16444c625a
3 changed files with 44 additions and 58 deletions

View File

@ -232,20 +232,14 @@ export class DeviceController {
}
@ApiBearerAuth()
@UseGuards(JwtAuthGuard, CheckFourAndSixSceneDeviceTypeGuard)
@Get(':deviceUuid/scenes/switch')
async getSceneBySceneDevice(
@Get(':deviceUuid/scenes')
async getScenesBySceneDevice(
@Param('deviceUuid') deviceUuid: string,
@Query() getSceneFourSceneDeviceDto: GetSceneFourSceneDeviceDto,
) {
return await this.deviceService.getSceneBySceneDevice(
return await this.deviceService.getScenesBySceneDevice(
deviceUuid,
getSceneFourSceneDeviceDto,
);
}
@ApiBearerAuth()
@UseGuards(JwtAuthGuard, CheckFourAndSixSceneDeviceTypeGuard)
@Get(':deviceUuid/scenes')
async getScenesBySceneDevice(@Param('deviceUuid') deviceUuid: string) {
return await this.deviceService.getScenesBySceneDevice(deviceUuid);
}
}