From bfbd912886eba17b4aa9a40dcef2fddc685d85bf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 31 Jul 2019 15:57:32 +0200 Subject: Fix broken playlist api --- server/models/video/video-playlist.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/models/video/video-playlist.ts') diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index 63b4a0715..61ff78bd2 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts @@ -33,7 +33,7 @@ import { WEBSERVER } from '../../initializers/constants' import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' -import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' +import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account' import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' import { join } from 'path' import { VideoPlaylistElementModel } from './video-playlist-element' @@ -115,7 +115,7 @@ type AvailableForListOptions = { [ ScopeNames.AVAILABLE_FOR_LIST ]: (options: AvailableForListOptions) => { // Only list local playlists OR playlists that are on an instance followed by actorId const inQueryInstanceFollow = buildServerIdsFollowedBy(options.followerActorId) - const actorWhere = { + const whereActor = { [ Op.or ]: [ { serverId: null @@ -159,7 +159,7 @@ type AvailableForListOptions = { } const accountScope = { - method: [ AccountScopeNames.SUMMARY, actorWhere ] + method: [ AccountScopeNames.SUMMARY, { whereActor } as SummaryOptions ] } return { @@ -341,7 +341,7 @@ export class VideoPlaylistModel extends Model { }, include: [ { - attributes: [ 'videoId', 'startTimestamp', 'stopTimestamp' ], + attributes: [ 'id', 'videoId', 'startTimestamp', 'stopTimestamp' ], model: VideoPlaylistElementModel.unscoped(), where: { videoId: { -- cgit v1.2.3