Expanded tag database.

This commit is contained in:
2019-04-04 04:44:37 +02:00
parent b3beeef3e4
commit 784542253b
4 changed files with 266 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ async function matchTags(rawTags) {
.orWhereIn('tags.tag', rawTags.map(tag => tag.toLowerCase()))
.leftJoin('tags as original', 'tags.alias_for', 'original.tag');
return tagEntries.map(({ tag }) => tag);
return Array.from(new Set(tagEntries.map(({ tag }) => tag))).sort(); // reduce to tag name and filter duplicates
}
module.exports = { matchTags };