Skip to content
This repository was archived by the owner on Aug 6, 2024. It is now read-only.

Commit ba4edb9

Browse files
authored
Merge pull request #642 from stuysu/readd-orgs-active
Readd active option to organization query
2 parents bbf6e0f + ff23cce commit ba4edb9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/graphql/resolvers/Query/organizations.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,22 @@ export default async (root, args, context) => {
1010
meetingDays,
1111
limit,
1212
offset,
13+
active,
1314
randomOrderSeed
1415
} = args;
1516

1617
const { models } = context;
1718
const { Op } = models.Sequelize;
1819

1920
const filterParams = {
20-
where: {
21-
active: true
22-
},
21+
where: {},
2322
include: []
2423
};
2524

25+
if (active) {
26+
filterParams.where.active = true;
27+
}
28+
2629
if (!keyword && typeof randomOrderSeed === 'number' && isUsingMysql) {
2730
filterParams.order = [models.sequelize.fn('RAND', randomOrderSeed)];
2831
}

0 commit comments

Comments
 (0)