diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-06 14:54:52 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-06 14:54:52 +0200 |
commit | 8d199cb823e1e47de87fdf421964e260b0ba6eb7 (patch) | |
tree | 563c5bd10235e69d84514a9b8348b525cc6d8765 /server/models/videos.js | |
parent | be587647f98a4b83ca06a61fe55c7ac5d60927c6 (diff) | |
download | PeerTube-8d199cb823e1e47de87fdf421964e260b0ba6eb7.tar.gz PeerTube-8d199cb823e1e47de87fdf421964e260b0ba6eb7.tar.zst PeerTube-8d199cb823e1e47de87fdf421964e260b0ba6eb7.zip |
Add tag search support to server
Diffstat (limited to 'server/models/videos.js')
-rw-r--r-- | server/models/videos.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/models/videos.js b/server/models/videos.js index f4658c371..d6b743c7c 100644 --- a/server/models/videos.js +++ b/server/models/videos.js | |||
@@ -128,7 +128,7 @@ function removeByIds (ids, callback) { | |||
128 | function search (value, field, start, count, sort, callback) { | 128 | function search (value, field, start, count, sort, callback) { |
129 | const query = {} | 129 | const query = {} |
130 | // Make an exact search with the magnet | 130 | // Make an exact search with the magnet |
131 | if (field === 'magnetUri') { | 131 | if (field === 'magnetUri' || field === 'tags') { |
132 | query[field] = value | 132 | query[field] = value |
133 | } else { | 133 | } else { |
134 | query[field] = new RegExp(value) | 134 | query[field] = new RegExp(value) |