Skip to content

Commit

Permalink
chore: added admin authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemLavrentii committed Feb 27, 2025
1 parent 8357918 commit f768119
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ApiExcludeController } from '@nestjs/swagger';
import * as errors from '../errors';
import { WorkflowDefinitionService } from '@/workflow-defintion/workflow-definition.service';
import { CreateDemoWorkflowDefinitionDto } from '@/workflow-defintion/dtos/create-demo-workflow-definition-dto';
import { AdminAuthGuard } from '@/common/guards/admin-auth.guard';

@ApiExcludeController()
@common.Controller('internal/workflow-definition')
Expand All @@ -12,6 +13,7 @@ export class WorkflowControllerInternal {

@common.Post('/create-demo')
@swagger.ApiOkResponse()
@common.UseGuards(AdminAuthGuard)
@swagger.ApiForbiddenResponse({ type: errors.ForbiddenException })
async createDemoWorkflowDefinition(@common.Body() data: CreateDemoWorkflowDefinitionDto) {
return await this.service.createDemoWorkflowDefinition(data);
Expand Down

0 comments on commit f768119

Please sign in to comment.