aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/video-playlist.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts
index 0a7ff92df..c7dfc583b 100644
--- a/server/controllers/api/video-playlist.ts
+++ b/server/controllers/api/video-playlist.ts
@@ -292,7 +292,7 @@ async function addVideoInPlaylist (req: express.Request, res: express.Response)
292 videoId: video.id 292 videoId: video.id
293 }, { transaction: t }) 293 }, { transaction: t })
294 294
295 videoPlaylist.updatedAt = new Date() 295 videoPlaylist.changed('updatedAt', true)
296 await videoPlaylist.save({ transaction: t }) 296 await videoPlaylist.save({ transaction: t })
297 297
298 await sendUpdateVideoPlaylist(videoPlaylist, t) 298 await sendUpdateVideoPlaylist(videoPlaylist, t)
@@ -332,7 +332,7 @@ async function updateVideoPlaylistElement (req: express.Request, res: express.Re
332 332
333 const element = await videoPlaylistElement.save({ transaction: t }) 333 const element = await videoPlaylistElement.save({ transaction: t })
334 334
335 videoPlaylist.updatedAt = new Date() 335 videoPlaylist.changed('updatedAt', true)
336 await videoPlaylist.save({ transaction: t }) 336 await videoPlaylist.save({ transaction: t })
337 337
338 await sendUpdateVideoPlaylist(videoPlaylist, t) 338 await sendUpdateVideoPlaylist(videoPlaylist, t)
@@ -356,7 +356,7 @@ async function removeVideoFromPlaylist (req: express.Request, res: express.Respo
356 // Decrease position of the next elements 356 // Decrease position of the next elements
357 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, positionToDelete, null, -1, t) 357 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, positionToDelete, null, -1, t)
358 358
359 videoPlaylist.updatedAt = new Date() 359 videoPlaylist.changed('updatedAt', true)
360 await videoPlaylist.save({ transaction: t }) 360 await videoPlaylist.save({ transaction: t })
361 361
362 await sendUpdateVideoPlaylist(videoPlaylist, t) 362 await sendUpdateVideoPlaylist(videoPlaylist, t)
@@ -401,7 +401,7 @@ async function reorderVideosPlaylist (req: express.Request, res: express.Respons
401 // Decrease positions of elements after the old position of our ordered elements (decrease) 401 // Decrease positions of elements after the old position of our ordered elements (decrease)
402 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, null, -reorderLength, t) 402 await VideoPlaylistElementModel.increasePositionOf(videoPlaylist.id, oldPosition, null, -reorderLength, t)
403 403
404 videoPlaylist.updatedAt = new Date() 404 videoPlaylist.changed('updatedAt', true)
405 await videoPlaylist.save({ transaction: t }) 405 await videoPlaylist.save({ transaction: t })
406 406
407 await sendUpdateVideoPlaylist(videoPlaylist, t) 407 await sendUpdateVideoPlaylist(videoPlaylist, t)