aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/video-playlist.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts
index 2f81cf43c..2347e18d2 100644
--- a/server/controllers/api/video-playlist.ts
+++ b/server/controllers/api/video-playlist.ts
@@ -376,7 +376,7 @@ async function removeVideoFromPlaylist (req: express.Request, res: express.Respo
376 await videoPlaylistElement.destroy({ transaction: t }) 376 await videoPlaylistElement.destroy({ transaction: t })
377 377
378 // Decrease position of the next elements 378 // Decrease position of the next elements
379 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, positionToDelete, null, -1, t) 379 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, positionToDelete, -1, t)
380 380
381 videoPlaylist.changed('updatedAt', true) 381 videoPlaylist.changed('updatedAt', true)
382 await videoPlaylist.save({ transaction: t }) 382 await videoPlaylist.save({ transaction: t })
@@ -415,7 +415,7 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons
415 const newPosition = insertAfter + 1 415 const newPosition = insertAfter + 1
416 416
417 // Add space after the position when we want to insert our reordered elements (increase) 417 // Add space after the position when we want to insert our reordered elements (increase)
418 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, newPosition, null, reorderLength, t) 418 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, newPosition, reorderLength, t)
419 419
420 let oldPosition = start 420 let oldPosition = start
421 421
@@ -427,7 +427,7 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons
427 await VideoPlaylistElementModel.reassignPositionOf(videoPlaylist.id, oldPosition, endOldPosition, newPosition, t) 427 await VideoPlaylistElementModel.reassignPositionOf(videoPlaylist.id, oldPosition, endOldPosition, newPosition, t)
428 428
429 // Decrease positions of elements after the old position of our ordered elements (decrease) 429 // Decrease positions of elements after the old position of our ordered elements (decrease)
430 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, null, -reorderLength, t) 430 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, -reorderLength, t)
431 431
432 videoPlaylist.changed('updatedAt', true) 432 videoPlaylist.changed('updatedAt', true)
433 await videoPlaylist.save({ transaction: t }) 433 await videoPlaylist.save({ transaction: t })