refactor(core): Convert workflows controller to DI (no-changelog) (#8253)

This commit is contained in:
Iván Ovejero
2024-01-08 12:54:23 +01:00
committed by GitHub
parent ac1c642fdd
commit 90c065e999
10 changed files with 179 additions and 232 deletions

View File

@@ -1,5 +1,5 @@
import { Authorized, Get, RestController } from '@/decorators';
import { WorkflowRequest } from '@/requests';
import { ActiveWorkflowRequest } from '@/requests';
import { ActiveWorkflowsService } from '@/services/activeWorkflows.service';
@Authorized()
@@ -8,12 +8,12 @@ export class ActiveWorkflowsController {
constructor(private readonly activeWorkflowsService: ActiveWorkflowsService) {}
@Get('/')
async getActiveWorkflows(req: WorkflowRequest.GetAllActive) {
async getActiveWorkflows(req: ActiveWorkflowRequest.GetAllActive) {
return this.activeWorkflowsService.getAllActiveIdsFor(req.user);
}
@Get('/error/:id')
async getActivationError(req: WorkflowRequest.GetActivationError) {
async getActivationError(req: ActiveWorkflowRequest.GetActivationError) {
const {
user,
params: { id: workflowId },