]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/users/my-history.ts
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / server / controllers / api / users / my-history.ts
index 80d4dc748c5e0b4e38211c74034bea0bd3d96360..72c7da3739945a9cbe4e627281f88d91edcce064 100644 (file)
@@ -5,6 +5,7 @@ import {
   authenticate,
   paginationValidator,
   setDefaultPagination,
+  userHistoryListValidator,
   userHistoryRemoveValidator
 } from '../../../middlewares'
 import { getFormattedObjects } from '../../../helpers/utils'
@@ -18,6 +19,7 @@ myVideosHistoryRouter.get('/me/history/videos',
   authenticate,
   paginationValidator,
   setDefaultPagination,
+  userHistoryListValidator,
   asyncMiddleware(listMyVideosHistory)
 )
 
@@ -38,7 +40,7 @@ export {
 async function listMyVideosHistory (req: express.Request, res: express.Response) {
   const user = res.locals.oauth.token.User
 
-  const resultList = await UserVideoHistoryModel.listForApi(user, req.query.start, req.query.count)
+  const resultList = await UserVideoHistoryModel.listForApi(user, req.query.start, req.query.count, req.query.search)
 
   return res.json(getFormattedObjects(resultList.data, resultList.total))
 }