fix: submissions module constructs its own VideoService (root-module provider not importable)

This commit is contained in:
glass beadian 2026-10-14 13:45:15 +00:00
parent b4ff73ffa8
commit 71ccc1db75

View file

@ -14,14 +14,17 @@ import { SUBMISSION_DEPS, SubmissionsService } from "./submissions.service.js";
providers: [ providers: [
SubmissionsService, SubmissionsService,
{ {
// VideoService is registered in the root module's providers, not a
// feature module — construct our own (stateless over the pool + S3).
provide: SUBMISSION_DEPS, provide: SUBMISSION_DEPS,
useFactory: (video: VideoService | null) => ({ useFactory: () => {
const video = new VideoService();
return {
storage: null, storage: null,
videoUpload: video === null videoUpload: (workspaceId: string, storageKey: string, mimeType: string, sizeBytes: number) =>
? null video.uploadVideo(workspaceId, storageKey, mimeType, sizeBytes),
: (workspaceId: string, storageKey: string, mimeType: string, sizeBytes: number) => video.uploadVideo(workspaceId, storageKey, mimeType, sizeBytes), };
}), },
inject: [VideoService],
}, },
], ],
exports: [SubmissionsService], exports: [SubmissionsService],