diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/video-playlist.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts index 49432d3aa..0a7ff92df 100644 --- a/server/controllers/api/video-playlist.ts +++ b/server/controllers/api/video-playlist.ts | |||
@@ -41,6 +41,7 @@ import { VideoPlaylistElementCreate } from '../../../shared/models/videos/playli | |||
41 | import { VideoPlaylistElementUpdate } from '../../../shared/models/videos/playlist/video-playlist-element-update.model' | 41 | import { VideoPlaylistElementUpdate } from '../../../shared/models/videos/playlist/video-playlist-element-update.model' |
42 | import { copy, pathExists } from 'fs-extra' | 42 | import { copy, pathExists } from 'fs-extra' |
43 | import { AccountModel } from '../../models/account/account' | 43 | import { AccountModel } from '../../models/account/account' |
44 | import { VideoPlaylistReorder } from '../../../shared/models/videos/playlist/video-playlist-reorder.model' | ||
44 | 45 | ||
45 | const reqThumbnailFile = createReqFiles([ 'thumbnailfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { thumbnailfile: CONFIG.STORAGE.TMP_DIR }) | 46 | const reqThumbnailFile = createReqFiles([ 'thumbnailfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { thumbnailfile: CONFIG.STORAGE.TMP_DIR }) |
46 | 47 | ||
@@ -368,10 +369,11 @@ async function removeVideoFromPlaylist (req: express.Request, res: express.Respo | |||
368 | 369 | ||
369 | async function reorderVideosPlaylist (req: express.Request, res: express.Response) { | 370 | async function reorderVideosPlaylist (req: express.Request, res: express.Response) { |
370 | const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist | 371 | const videoPlaylist: VideoPlaylistModel = res.locals.videoPlaylist |
372 | const body: VideoPlaylistReorder = req.body | ||
371 | 373 | ||
372 | const start: number = req.body.startPosition | 374 | const start: number = body.startPosition |
373 | const insertAfter: number = req.body.insertAfterPosition | 375 | const insertAfter: number = body.insertAfterPosition |
374 | const reorderLength: number = req.body.reorderLength || 1 | 376 | const reorderLength: number = body.reorderLength || 1 |
375 | 377 | ||
376 | if (start === insertAfter) { | 378 | if (start === insertAfter) { |
377 | return res.status(204).end() | 379 | return res.status(204).end() |