Skip to content

Commit

Permalink
Add if to filter users groups (#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
NitayRabi authored and amotenko committed May 6, 2018
1 parent 2e130cb commit 27f4ff4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions routes/api/api_gate_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ router.post('/get-ticket/', async function (req, res) {
if (holder.relations.groups) {
_.each(holder.relations.groups.models, group => {
// if (groupsMembershipData.contains(group.attributes.group_id)) {
groups.push({
id: group.attributes.group_id,
type: group.attributes.type,
name: group.attributes.name
});
if (group.attributes.event_id === req.body.event_id) {
groups.push({
id: group.attributes.group_id,
type: group.attributes.type,
name: group.attributes.name
});
}
// }
});
}
Expand Down

0 comments on commit 27f4ff4

Please sign in to comment.