]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/videos.js
Add tag search support to server
[github/Chocobozzz/PeerTube.git] / server / models / videos.js
index f4658c371fec2a1e0153a3dd238cc9abad70f296..d6b743c7c46fe4db7ae5e0332f56d6adfe072289 100644 (file)
@@ -128,7 +128,7 @@ function removeByIds (ids, callback) {
 function search (value, field, start, count, sort, callback) {
   const query = {}
   // Make an exact search with the magnet
-  if (field === 'magnetUri') {
+  if (field === 'magnetUri' || field === 'tags') {
     query[field] = value
   } else {
     query[field] = new RegExp(value)