mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 11:17:55 +00:00
Fixed automation bugs
This commit is contained in:
@@ -18,11 +18,7 @@ import {
|
||||
} from '../dtos/automation.dto';
|
||||
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
||||
import { EnableDisableStatusEnum } from '@app/common/constants/days.enum';
|
||||
import {
|
||||
AutomationParamDto,
|
||||
DeleteAutomationParamDto,
|
||||
SpaceParamDto,
|
||||
} from '../dtos';
|
||||
import { AutomationParamDto, SpaceParamDto } from '../dtos';
|
||||
|
||||
@ApiTags('Automation Module')
|
||||
@Controller({
|
||||
@@ -45,6 +41,7 @@ export class AutomationController {
|
||||
data: automation,
|
||||
};
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get(':spaceUuid')
|
||||
@@ -67,14 +64,15 @@ export class AutomationController {
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Delete(':unitUuid/:automationId')
|
||||
async deleteAutomation(@Param() param: DeleteAutomationParamDto) {
|
||||
@Delete(':automationUuid')
|
||||
async deleteAutomation(@Param() param: AutomationParamDto) {
|
||||
await this.automationService.deleteAutomation(param);
|
||||
return {
|
||||
statusCode: HttpStatus.OK,
|
||||
message: 'Automation Deleted Successfully',
|
||||
};
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Put(':automationUuid')
|
||||
|
||||
Reference in New Issue
Block a user