fix: submissions module constructs its own VideoService (root-module provider not importable)
This commit is contained in:
parent
b4ff73ffa8
commit
71ccc1db75
1 changed files with 10 additions and 7 deletions
|
|
@ -14,14 +14,17 @@ import { SUBMISSION_DEPS, SubmissionsService } from "./submissions.service.js";
|
|||
providers: [
|
||||
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,
|
||||
useFactory: (video: VideoService | null) => ({
|
||||
storage: null,
|
||||
videoUpload: video === null
|
||||
? null
|
||||
: (workspaceId: string, storageKey: string, mimeType: string, sizeBytes: number) => video.uploadVideo(workspaceId, storageKey, mimeType, sizeBytes),
|
||||
}),
|
||||
inject: [VideoService],
|
||||
useFactory: () => {
|
||||
const video = new VideoService();
|
||||
return {
|
||||
storage: null,
|
||||
videoUpload: (workspaceId: string, storageKey: string, mimeType: string, sizeBytes: number) =>
|
||||
video.uploadVideo(workspaceId, storageKey, mimeType, sizeBytes),
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
exports: [SubmissionsService],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue