X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-channel.ts;h=ca06048d1c47e65c73231be9d30209f352db8ee9;hb=9c6ca37fc1512a99d420ea90707cebcd06cdc970;hp=112abf8cfad7150553031898d25940ed1a2e17ff;hpb=418d092afa81e2c8fe8ac6838fc4b5eb0af6a782;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 112abf8cf..ca06048d1 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -67,9 +67,9 @@ type AvailableForListOptions = { ] }) @Scopes({ - [ScopeNames.SUMMARY]: (required: boolean, withAccount: boolean) => { + [ScopeNames.SUMMARY]: (withAccount = false) => { const base: IFindOptions = { - attributes: [ 'name', 'description', 'id' ], + attributes: [ 'name', 'description', 'id', 'actorId' ], include: [ { attributes: [ 'uuid', 'preferredUsername', 'url', 'serverId', 'avatarId' ], @@ -223,9 +223,9 @@ export class VideoChannelModel extends Model { @HasMany(() => VideoPlaylistModel, { foreignKey: { - allowNull: false + allowNull: true }, - onDelete: 'cascade', + onDelete: 'CASCADE', hooks: true }) VideoPlaylists: VideoPlaylistModel[]