X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-channel.ts;h=fb70e662526a6561ca44f1ffb2ae9d85628a8d1c;hb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;hp=901006deae1a13c63831c8f847adfdd54bc00263;hpb=1735c825726edaa0af5035cb6cbb0cc0db502c6d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 901006dea..fb70e6625 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -58,15 +58,15 @@ type AvailableForListOptions = { actorId: number } -@DefaultScope({ +@DefaultScope(() => ({ include: [ { - model: () => ActorModel, + model: ActorModel, required: true } ] -}) -@Scopes({ +})) +@Scopes(() => ({ [ScopeNames.SUMMARY]: (withAccount = false) => { const base: FindOptions = { attributes: [ 'name', 'description', 'id', 'actorId' ], @@ -142,22 +142,22 @@ type AvailableForListOptions = { [ScopeNames.WITH_ACCOUNT]: { include: [ { - model: () => AccountModel, + model: AccountModel, required: true } ] }, [ScopeNames.WITH_VIDEOS]: { include: [ - () => VideoModel + VideoModel ] }, [ScopeNames.WITH_ACTOR]: { include: [ - () => ActorModel + ActorModel ] } -}) +})) @Table({ tableName: 'videoChannel', indexes