Fix unused parameter
This commit is contained in:
parent
e5830ac64b
commit
11a554cfcf
|
@ -376,7 +376,7 @@ async function removeVideoFromPlaylist (req: express.Request, res: express.Respo
|
||||||
await videoPlaylistElement.destroy({ transaction: t })
|
await videoPlaylistElement.destroy({ transaction: t })
|
||||||
|
|
||||||
// Decrease position of the next elements
|
// 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)
|
videoPlaylist.changed('updatedAt', true)
|
||||||
await videoPlaylist.save({ transaction: t })
|
await videoPlaylist.save({ transaction: t })
|
||||||
|
@ -415,7 +415,7 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons
|
||||||
const newPosition = insertAfter + 1
|
const newPosition = insertAfter + 1
|
||||||
|
|
||||||
// Add space after the position when we want to insert our reordered elements (increase)
|
// 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
|
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)
|
await VideoPlaylistElementModel.reassignPositionOf(videoPlaylist.id, oldPosition, endOldPosition, newPosition, t)
|
||||||
|
|
||||||
// Decrease positions of elements after the old position of our ordered elements (decrease)
|
// 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)
|
videoPlaylist.changed('updatedAt', true)
|
||||||
await videoPlaylist.save({ transaction: t })
|
await videoPlaylist.save({ transaction: t })
|
||||||
|
|
|
@ -282,7 +282,6 @@ export class VideoPlaylistElementModel extends Model<Partial<AttributesOnly<Vide
|
||||||
static increasePositionOf (
|
static increasePositionOf (
|
||||||
videoPlaylistId: number,
|
videoPlaylistId: number,
|
||||||
fromPosition: number,
|
fromPosition: number,
|
||||||
toPosition?: number,
|
|
||||||
by = 1,
|
by = 1,
|
||||||
transaction?: Transaction
|
transaction?: Transaction
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user