Skip to content

Commit

Permalink
bug(tags): search by tags
Browse files Browse the repository at this point in the history
  • Loading branch information
minega25 committed Nov 14, 2019
1 parent 16e8bec commit b348eb0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
4 changes: 3 additions & 1 deletion src/controllers/search.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ class Search {
})
);
let duplicateFoundTags = [];
foundArticles.map(article => {
const allArticles = await ArticleModel.getAllArticles();
allArticles.map(article => {
const articleTags = article.taglist;
console.log(articleTags);
const found = articleTags.filter(
articleTag => articleTag === searchQuery.tag
);
Expand Down
47 changes: 24 additions & 23 deletions src/seeders/20190820133339-demo-article-2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b348eb0

Please sign in to comment.