fix(api,orchestrator): fix remaining dependency injection issues
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
API: - Add AuthModule import to JobEventsModule - Add AuthModule import to JobStepsModule - Fixes: AuthGuard dependency resolution in job modules Orchestrator: - Add @Optional() decorator to docker parameter in DockerSandboxService - Fixes: NestJS trying to inject Docker class as dependency All modules using AuthGuard must import AuthModule. Docker parameter is optional for testing, needs @Optional() decorator.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Injectable, Logger } from "@nestjs/common";
|
||||
import { Injectable, Logger, Optional } from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import { randomBytes } from "crypto";
|
||||
import Docker from "dockerode";
|
||||
@@ -86,7 +86,7 @@ export class DockerSandboxService {
|
||||
|
||||
constructor(
|
||||
private readonly configService: ConfigService,
|
||||
docker?: Docker
|
||||
@Optional() docker?: Docker
|
||||
) {
|
||||
const socketPath = this.configService.get<string>(
|
||||
"orchestrator.docker.socketPath",
|
||||
|
||||
Reference in New Issue
Block a user