aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2019-12-26 11:52:46 +0100
committerRigel Kent <sendmemail@rigelk.eu>2019-12-26 11:52:52 +0100
commitc06af5012ecc925ca924e6e20db3a1d909b1148e (patch)
tree88a3595bfd0a68e8f5314737a22f9516d9790c9b /server/controllers
parentdef2a70b7e5ee807d7b532df8c9d33d17d24ccbb (diff)
downloadPeerTube-c06af5012ecc925ca924e6e20db3a1d909b1148e.tar.gz
PeerTube-c06af5012ecc925ca924e6e20db3a1d909b1148e.tar.zst
PeerTube-c06af5012ecc925ca924e6e20db3a1d909b1148e.zip
Add playlist search option and search input for add-to-video-playlist dropdown
fixes #2138
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/accounts.ts7
1 files changed, 6 insertions, 1 deletions
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'
27import { JobQueue } from '../../lib/job-queue' 27import { JobQueue } from '../../lib/job-queue'
28import { logger } from '../../helpers/logger' 28import { logger } from '../../helpers/logger'
29import { VideoPlaylistModel } from '../../models/video/video-playlist' 29import { VideoPlaylistModel } from '../../models/video/video-playlist'
30import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists' 30import {
31 commonVideoPlaylistFiltersValidator,
32 videoPlaylistsSearchValidator
33} from '../../middlewares/validators/videos/video-playlists'
31 34
32const accountsRouter = express.Router() 35const accountsRouter = express.Router()
33 36
@@ -72,6 +75,7 @@ accountsRouter.get('/:accountName/video-playlists',
72 setDefaultSort, 75 setDefaultSort,
73 setDefaultPagination, 76 setDefaultPagination,
74 commonVideoPlaylistFiltersValidator, 77 commonVideoPlaylistFiltersValidator,
78 videoPlaylistsSearchValidator,
75 asyncMiddleware(listAccountPlaylists) 79 asyncMiddleware(listAccountPlaylists)
76) 80)
77 81
@@ -135,6 +139,7 @@ async function listAccountPlaylists (req: express.Request, res: express.Response
135 } 139 }
136 140
137 const resultList = await VideoPlaylistModel.listForApi({ 141 const resultList = await VideoPlaylistModel.listForApi({
142 search: req.query.search,
138 followerActorId: serverActor.id, 143 followerActorId: serverActor.id,
139 start: req.query.start, 144 start: req.query.start,
140 count: req.query.count, 145 count: req.query.count,