authenticate,
paginationValidator,
setDefaultPagination,
+ userHistoryListValidator,
userHistoryRemoveValidator
} from '../../../middlewares'
import { getFormattedObjects } from '../../../helpers/utils'
authenticate,
paginationValidator,
setDefaultPagination,
+ userHistoryListValidator,
asyncMiddleware(listMyVideosHistory)
)
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))
}