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:
parent
46db9430af
commit
51b34a11b2
10 changed files with 259 additions and 114 deletions
|
@ -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] = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue