diff options
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r-- | server/controllers/api/accounts.ts | 5 |
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' | |||
18 | import { logger } from '../../helpers/logger' | 18 | import { logger } from '../../helpers/logger' |
19 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 19 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
20 | import { UserModel } from '../../models/account/user' | 20 | import { UserModel } from '../../models/account/user' |
21 | import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists' | ||
21 | 22 | ||
22 | const accountsRouter = express.Router() | 23 | const 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)) |