Fixed automation bugs

This commit is contained in:
hannathkadher
2024-11-05 00:48:54 +04:00
parent aad794b2cd
commit a3eaa0fa3c
10 changed files with 227 additions and 151 deletions
@@ -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')