1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Share playlists state

This commit is contained in:
Chocobozzz 2020-01-06 13:06:13 +01:00
parent 46db9430af
commit 51b34a11b2
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 259 additions and 114 deletions

View file

@ -2,7 +2,7 @@ import * as express from 'express'
import { asyncMiddleware, authenticate } from '../../../middlewares'
import { doVideosInPlaylistExistValidator } from '../../../middlewares/validators/videos/video-playlists'
import { VideoPlaylistModel } from '../../../models/video/video-playlist'
import { VideoExistInPlaylist } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model'
import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model'
const myVideoPlaylistsRouter = express.Router()
@ -26,7 +26,7 @@ async function doVideosInPlaylistExist (req: express.Request, res: express.Respo
const results = await VideoPlaylistModel.listPlaylistIdsOf(user.Account.id, videoIds)
const existObject: VideoExistInPlaylist = {}
const existObject: VideosExistInPlaylists = {}
for (const videoId of videoIds) {
existObject[videoId] = []