Minor adjustment on tags to allow comma separated/etc.

This commit is contained in:
Bryan Ashby 2017-12-12 21:32:01 -07:00
parent 7f80f4a7af
commit 1c5a00313b
1 changed files with 2 additions and 2 deletions

View File

@ -528,8 +528,8 @@ module.exports = class FileEntry {
}
if(filter.tags && filter.tags.length > 0) {
// build list of quoted tags; filter.tags comes in as a space separated values
const tags = filter.tags.split(' ').map( tag => `"${tag}"` ).join(',');
// build list of quoted tags; filter.tags comes in as a space and/or comma separated values
const tags = filter.tags.replace(/,/g, ' ').replace(/\s{2,}/g, ' ').split(' ').map( tag => `"${tag}"` ).join(',');
appendWhereClause(
`f.file_id IN (