From c06af5012ecc925ca924e6e20db3a1d909b1148e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 26 Dec 2019 11:52:46 +0100 Subject: Add playlist search option and search input for add-to-video-playlist dropdown fixes #2138 --- server/controllers/api/accounts.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index 5a1d652f2..c49da3c0a 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts @@ -27,7 +27,10 @@ import { VideoChannelModel } from '../../models/video/video-channel' import { JobQueue } from '../../lib/job-queue' import { logger } from '../../helpers/logger' import { VideoPlaylistModel } from '../../models/video/video-playlist' -import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists' +import { + commonVideoPlaylistFiltersValidator, + videoPlaylistsSearchValidator +} from '../../middlewares/validators/videos/video-playlists' const accountsRouter = express.Router() @@ -72,6 +75,7 @@ accountsRouter.get('/:accountName/video-playlists', setDefaultSort, setDefaultPagination, commonVideoPlaylistFiltersValidator, + videoPlaylistsSearchValidator, asyncMiddleware(listAccountPlaylists) ) @@ -135,6 +139,7 @@ async function listAccountPlaylists (req: express.Request, res: express.Response } const resultList = await VideoPlaylistModel.listForApi({ + search: req.query.search, followerActorId: serverActor.id, start: req.query.start, count: req.query.count, -- cgit v1.2.3