From 11a554cfcf96dab55681001976a553ff8e3d9dcf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Nov 2021 09:29:54 +0100 Subject: Fix unused parameter --- server/controllers/api/video-playlist.ts | 6 +++--- server/models/video/video-playlist-element.ts | 1 - 2 files changed, 3 insertions(+), 4 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 await videoPlaylistElement.destroy({ transaction: t }) // Decrease position of the next elements - await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, positionToDelete, null, -1, t) + await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, positionToDelete, -1, t) videoPlaylist.changed('updatedAt', true) await videoPlaylist.save({ transaction: t }) @@ -415,7 +415,7 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons const newPosition = insertAfter + 1 // Add space after the position when we want to insert our reordered elements (increase) - await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, newPosition, null, reorderLength, t) + await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, newPosition, reorderLength, t) let oldPosition = start @@ -427,7 +427,7 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons await VideoPlaylistElementModel.reassignPositionOf(videoPlaylist.id, oldPosition, endOldPosition, newPosition, t) // Decrease positions of elements after the old position of our ordered elements (decrease) - await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, null, -reorderLength, t) + await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, -reorderLength, t) videoPlaylist.changed('updatedAt', true) await videoPlaylist.save({ transaction: t }) diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts index e6906cb19..82c832188 100644 --- a/server/models/video/video-playlist-element.ts +++ b/server/models/video/video-playlist-element.ts @@ -282,7 +282,6 @@ export class VideoPlaylistElementModel extends Model