aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/accounts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r--server/controllers/api/accounts.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index b1c05c6c0..0a73dfcbf 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -1,5 +1,8 @@
1import * as express from 'express' 1import * as express from 'express'
2import { getServerActor } from '@server/models/application/application'
3import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
2import { getFormattedObjects } from '../../helpers/utils' 4import { getFormattedObjects } from '../../helpers/utils'
5import { JobQueue } from '../../lib/job-queue'
3import { 6import {
4 asyncMiddleware, 7 asyncMiddleware,
5 authenticate, 8 authenticate,
@@ -8,6 +11,7 @@ import {
8 paginationValidator, 11 paginationValidator,
9 setDefaultPagination, 12 setDefaultPagination,
10 setDefaultSort, 13 setDefaultSort,
14 setDefaultVideosSort,
11 videoPlaylistsSortValidator, 15 videoPlaylistsSortValidator,
12 videoRatesSortValidator, 16 videoRatesSortValidator,
13 videoRatingValidator 17 videoRatingValidator
@@ -17,18 +21,15 @@ import {
17 accountsSortValidator, 21 accountsSortValidator,
18 ensureAuthUserOwnsAccountValidator, 22 ensureAuthUserOwnsAccountValidator,
19 videoChannelsSortValidator, 23 videoChannelsSortValidator,
20 videosSortValidator, 24 videoChannelStatsValidator,
21 videoChannelStatsValidator 25 videosSortValidator
22} from '../../middlewares/validators' 26} from '../../middlewares/validators'
27import { commonVideoPlaylistFiltersValidator, videoPlaylistsSearchValidator } from '../../middlewares/validators/videos/video-playlists'
23import { AccountModel } from '../../models/account/account' 28import { AccountModel } from '../../models/account/account'
24import { AccountVideoRateModel } from '../../models/account/account-video-rate' 29import { AccountVideoRateModel } from '../../models/account/account-video-rate'
25import { VideoModel } from '../../models/video/video' 30import { VideoModel } from '../../models/video/video'
26import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
27import { VideoChannelModel } from '../../models/video/video-channel' 31import { VideoChannelModel } from '../../models/video/video-channel'
28import { JobQueue } from '../../lib/job-queue'
29import { VideoPlaylistModel } from '../../models/video/video-playlist' 32import { VideoPlaylistModel } from '../../models/video/video-playlist'
30import { commonVideoPlaylistFiltersValidator, videoPlaylistsSearchValidator } from '../../middlewares/validators/videos/video-playlists'
31import { getServerActor } from '@server/models/application/application'
32 33
33const accountsRouter = express.Router() 34const accountsRouter = express.Router()
34 35
@@ -49,7 +50,7 @@ accountsRouter.get('/:accountName/videos',
49 asyncMiddleware(accountNameWithHostGetValidator), 50 asyncMiddleware(accountNameWithHostGetValidator),
50 paginationValidator, 51 paginationValidator,
51 videosSortValidator, 52 videosSortValidator,
52 setDefaultSort, 53 setDefaultVideosSort,
53 setDefaultPagination, 54 setDefaultPagination,
54 optionalAuthenticate, 55 optionalAuthenticate,
55 commonVideosFiltersValidator, 56 commonVideosFiltersValidator,