1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add channel filters for my videos/followers

This commit is contained in:
Chocobozzz 2021-10-20 09:05:43 +02:00
parent 7e76cc3800
commit 978c87e7f5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
15 changed files with 207 additions and 54 deletions

View file

@ -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')