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: [
|
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],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue