Skip to content

Commit

Permalink
168071319-bug(search) fix search
Browse files Browse the repository at this point in the history
- add category to response

[Finishes #168071319]
  • Loading branch information
fantastic-genius committed Aug 23, 2019
1 parent 970411b commit 773b6f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions controllers/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import Sequelize from 'sequelize';
import db from '../../db/models';

const { Op } = Sequelize;
let include = [];
let include = [{
model: db.Category,
as: 'category',
attributes: ['name']
}];
const setInclude = association => [...include, association];

export const tagFilter = async (req, res, next) => {
Expand Down Expand Up @@ -52,6 +56,5 @@ export const end = async (req, res) => {
}
);

include = [];
res.status(200).json({ search });
};

0 comments on commit 773b6f0

Please sign in to comment.