summaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
authorBoHong Li2017-04-13 01:57:55 +0800
committerRaccoon Li2017-05-08 19:29:07 +0800
commitecb05336055a37ba8a03c119995cd37d96aad90d (patch)
treef6815f5ce06befbe3bdb51cfd941d2c6edaf51a0 /lib/web
parent4738ba7d364111adeb2eb2036d0b24d53a80c0c7 (diff)
refactor(config.js): Extract config file
* Separate different config source to each files * Freeze config object
Diffstat (limited to '')
-rw-r--r--lib/web/auth/index.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/web/auth/index.js b/lib/web/auth/index.js
index 8a4eb774..b5ca8434 100644
--- a/lib/web/auth/index.js
+++ b/lib/web/auth/index.js
@@ -29,14 +29,14 @@ passport.deserializeUser(function (id, done) {
})
})
-if (config.facebook) authRouter.use(require('./facebook'))
-if (config.twitter) authRouter.use(require('./twitter'))
-if (config.github) authRouter.use(require('./github'))
-if (config.gitlab) authRouter.use(require('./gitlab'))
-if (config.dropbox) authRouter.use(require('./dropbox'))
-if (config.google) authRouter.use(require('./google'))
-if (config.ldap) authRouter.use(require('./ldap'))
-if (config.email) authRouter.use(require('./email'))
+if (config.isFacebookEnable) authRouter.use(require('./facebook'))
+if (config.isTwitterEnable) authRouter.use(require('./twitter'))
+if (config.isGitHubEnable) authRouter.use(require('./github'))
+if (config.isGitLabEnable) authRouter.use(require('./gitlab'))
+if (config.isDropboxEnable) authRouter.use(require('./dropbox'))
+if (config.isGoogleEnable) authRouter.use(require('./google'))
+if (config.isLDAPEnable) authRouter.use(require('./ldap'))
+if (config.isEmailEnable) authRouter.use(require('./email'))
// logout
authRouter.get('/logout', function (req, res) {