]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-channel.ts
Rename streaming playlists routes/directories
[github/Chocobozzz/PeerTube.git] / server / models / video / video-channel.ts
index 112abf8cfad7150553031898d25940ed1a2e17ff..ca06048d1c47e65c73231be9d30209f352db8ee9 100644 (file)
@@ -67,9 +67,9 @@ type AvailableForListOptions = {
   ]
 })
 @Scopes({
-  [ScopeNames.SUMMARY]: (required: boolean, withAccount: boolean) => {
+  [ScopeNames.SUMMARY]: (withAccount = false) => {
     const base: IFindOptions<VideoChannelModel> = {
-      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<VideoChannelModel> {
 
   @HasMany(() => VideoPlaylistModel, {
     foreignKey: {
-      allowNull: false
+      allowNull: true
     },
-    onDelete: 'cascade',
+    onDelete: 'CASCADE',
     hooks: true
   })
   VideoPlaylists: VideoPlaylistModel[]