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.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index 03c831092..e24545de8 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -18,6 +18,7 @@ import { JobQueue } from '../../lib/job-queue'
18import { logger } from '../../helpers/logger' 18import { logger } from '../../helpers/logger'
19import { VideoPlaylistModel } from '../../models/video/video-playlist' 19import { VideoPlaylistModel } from '../../models/video/video-playlist'
20import { UserModel } from '../../models/account/user' 20import { UserModel } from '../../models/account/user'
21import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists'
21 22
22const accountsRouter = express.Router() 23const accountsRouter = express.Router()
23 24
@@ -57,6 +58,7 @@ accountsRouter.get('/:accountName/video-playlists',
57 videoPlaylistsSortValidator, 58 videoPlaylistsSortValidator,
58 setDefaultSort, 59 setDefaultSort,
59 setDefaultPagination, 60 setDefaultPagination,
61 commonVideoPlaylistFiltersValidator,
60 asyncMiddleware(listAccountPlaylists) 62 asyncMiddleware(listAccountPlaylists)
61) 63)
62 64
@@ -106,7 +108,8 @@ async function listAccountPlaylists (req: express.Request, res: express.Response
106 count: req.query.count, 108 count: req.query.count,
107 sort: req.query.sort, 109 sort: req.query.sort,
108 accountId: res.locals.account.id, 110 accountId: res.locals.account.id,
109 privateAndUnlisted 111 privateAndUnlisted,
112 type: req.query.playlistType
110 }) 113 })
111 114
112 return res.json(getFormattedObjects(resultList.data, resultList.total)) 115 return res.json(getFormattedObjects(resultList.data, resultList.total))