]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/users/me.ts
Fix videos language tests
[github/Chocobozzz/PeerTube.git] / server / controllers / api / users / me.ts
index ac6faca9cdae6e02a27f2976ae50d7a5783cb35c..6bacdbbb63693702ee38423e4409fea48e90f8c7 100644 (file)
@@ -1,5 +1,5 @@
 import 'multer'
-import * as express from 'express'
+import express from 'express'
 import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger'
 import { Hooks } from '@server/lib/plugins/hooks'
 import { AttributesOnly } from '@shared/core-utils'
@@ -25,7 +25,7 @@ import {
   usersUpdateMeValidator,
   usersVideoRatingValidator
 } from '../../../middlewares'
-import { deleteMeValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators'
+import { deleteMeValidator, usersVideosValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators'
 import { updateAvatarValidator } from '../../../middlewares/validators/actor-image'
 import { AccountModel } from '../../../models/account/account'
 import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
@@ -69,6 +69,7 @@ meRouter.get('/me/videos',
   videosSortValidator,
   setDefaultVideosSort,
   setDefaultPagination,
+  asyncMiddleware(usersVideosValidator),
   asyncMiddleware(getUserVideos)
 )
 
@@ -113,6 +114,7 @@ async function getUserVideos (req: express.Request, res: express.Response) {
     count: req.query.count,
     sort: req.query.sort,
     search: req.query.search,
+    channelId: res.locals.videoChannel?.id,
     isLive: req.query.isLive
   }, 'filter:api.user.me.videos.list.params')
 
@@ -203,6 +205,7 @@ async function updateMe (req: express.Request, res: express.Response) {
     'videoLanguages',
     'theme',
     'noInstanceConfigWarningModal',
+    'noAccountSetupWarningModal',
     'noWelcomeModal'
   ]