Fix unused parameter

This commit is contained in:
Chocobozzz 2021-11-16 09:29:54 +01:00
parent e5830ac64b
commit 11a554cfcf
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 4 deletions

View File

@ -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 })

View File

@ -282,7 +282,6 @@ export class VideoPlaylistElementModel extends Model<Partial<AttributesOnly<Vide
static increasePositionOf (
videoPlaylistId: number,
fromPosition: number,
toPosition?: number,
by = 1,
transaction?: Transaction
) {