From 99b757488c077cee7d0ab89eeec181a7ee6290eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Nov 2022 15:00:19 +0100 Subject: Fix server lint --- server/controllers/api/video-playlist.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts index 67fac3751..f8a607170 100644 --- a/server/controllers/api/video-playlist.ts +++ b/server/controllers/api/video-playlist.ts @@ -4,6 +4,7 @@ import { scheduleRefreshIfNeeded } from '@server/lib/activitypub/playlists' import { Hooks } from '@server/lib/plugins/hooks' import { getServerActor } from '@server/models/application/application' import { MVideoPlaylistFull, MVideoPlaylistThumbnail, MVideoThumbnail } from '@server/types/models' +import { forceNumber } from '@shared/core-utils' import { uuidToShort } from '@shared/extra-utils' import { VideoPlaylistCreateResult, VideoPlaylistElementCreateResult } from '@shared/models' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' @@ -46,7 +47,6 @@ import { import { AccountModel } from '../../models/account/account' import { VideoPlaylistModel } from '../../models/video/video-playlist' import { VideoPlaylistElementModel } from '../../models/video/video-playlist-element' -import { forceNumber } from '@shared/core-utils' const reqThumbnailFile = createReqFiles([ 'thumbnailfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT) @@ -425,7 +425,13 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons const endOldPosition = oldPosition + reorderLength - 1 // Insert our reordered elements in their place (update) - await VideoPlaylistElementModel.reassignPositionOf({ videoPlaylistId: videoPlaylist.id, firstPosition: oldPosition, endPosition: endOldPosition, newPosition, transaction: t }) + await VideoPlaylistElementModel.reassignPositionOf({ + videoPlaylistId: videoPlaylist.id, + firstPosition: oldPosition, + endPosition: endOldPosition, + newPosition, + transaction: t + }) // Decrease positions of elements after the old position of our ordered elements (decrease) await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, -reorderLength, t) -- cgit v1.2.3