Skip to content

Commit 7c14d1e

Browse files
committed
fix mongo
1 parent 2477a30 commit 7c14d1e

3 files changed

Lines changed: 1672 additions & 1673 deletions

File tree

lib/controllers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ Controllers.getOpenIdMetadata = async (req, res) => {
5252
Controllers.getStrategy = async (req, res) => {
5353
const name = slugify(req.params.name);
5454

55-
const strategy = await db.getObject(`oauth2-multiple:strategies:${name}`);
56-
strategy.name = name;
55+
const strategy = await main.getStrategy(name);
5756

5857
helpers.formatApiResponse(200, res, { strategy });
5958
};

library.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async function getStrategies(names, full) {
6161
const strategies = await db.getObjects(names.map(name => `oauth2-multiple:strategies:${name}`), full ? undefined : ['enabled']);
6262
strategies.forEach((strategy, idx) => {
6363
strategy.name = names[idx];
64-
strategy.enabled = strategy.enabled === 'true';
64+
strategy.enabled = strategy.enabled === 'true' || strategy.enabled === true;
6565
strategy.callbackUrl = `${nconf.get('url')}/auth/${names[idx]}/callback`;
6666
});
6767

0 commit comments

Comments
 (0)