]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/blacklist.ts
Add publishedAt field for video model.
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / blacklist.ts
index c9087fd97ed744caece8c2ae835d9e02ce017eda..8112b59b804464e6eb0fc3653e81d8d6f5876fcc 100644 (file)
@@ -3,7 +3,7 @@ import { BlacklistedVideo, UserRight } from '../../../../shared'
 import { logger } from '../../../helpers/logger'
 import { getFormattedObjects } from '../../../helpers/utils'
 import {
-  asyncMiddleware, authenticate, blacklistSortValidator, ensureUserHasRight, paginationValidator, setBlacklistSort, setPagination,
+  asyncMiddleware, authenticate, blacklistSortValidator, ensureUserHasRight, paginationValidator, setBlacklistSort, setDefaultPagination,
   videosBlacklistAddValidator, videosBlacklistRemoveValidator
 } from '../../../middlewares'
 import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
@@ -23,7 +23,7 @@ blacklistRouter.get('/blacklist',
   paginationValidator,
   blacklistSortValidator,
   setBlacklistSort,
-  setPagination,
+  setDefaultPagination,
   asyncMiddleware(listBlacklist)
 )
 
@@ -69,7 +69,7 @@ async function removeVideoFromBlacklistController (req: express.Request, res: ex
 
     return res.sendStatus(204)
   } catch (err) {
-    logger.error('Some error while removing video %s from blacklist.', res.locals.video.uuid, err)
+    logger.error('Some error while removing video %s from blacklist.', res.locals.video.uuid, { err })
     throw err
   }
 }