X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-channel.ts;h=ca06048d1c47e65c73231be9d30209f352db8ee9;hb=9c6ca37fc1512a99d420ea90707cebcd06cdc970;hp=c077fb5184650461ab49cc48c06905ca1dc5cb55;hpb=07b1a18aa678d260009a93e36606c5c5f585723d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index c077fb518..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' ], @@ -225,7 +225,7 @@ export class VideoChannelModel extends Model { foreignKey: { allowNull: true }, - onDelete: 'cascade', + onDelete: 'CASCADE', hooks: true }) VideoPlaylists: VideoPlaylistModel[]