diff options
author | BoHong Li | 2017-04-13 01:57:55 +0800 |
---|---|---|
committer | Raccoon Li | 2017-05-08 19:29:07 +0800 |
commit | ecb05336055a37ba8a03c119995cd37d96aad90d (patch) | |
tree | f6815f5ce06befbe3bdb51cfd941d2c6edaf51a0 /lib/response.js | |
parent | 4738ba7d364111adeb2eb2036d0b24d53a80c0c7 (diff) |
refactor(config.js): Extract config file
* Separate different config source to each files
* Freeze config object
Diffstat (limited to 'lib/response.js')
-rwxr-xr-x | lib/response.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/response.js b/lib/response.js index 1d1db319..a9abd1d4 100755 --- a/lib/response.js +++ b/lib/response.js @@ -59,14 +59,14 @@ function showIndex (req, res, next) { url: config.serverurl, useCDN: config.usecdn, allowAnonymous: config.allowanonymous, - facebook: config.facebook, - twitter: config.twitter, - github: config.github, - gitlab: config.gitlab, - dropbox: config.dropbox, - google: config.google, - ldap: config.ldap, - email: config.email, + facebook: config.isFacebookEnable, + twitter: config.isTwitterEnable, + github: config.isGitHubEnable, + gitlab: config.isGitLabEnable, + dropbox: config.isDropboxEnable, + google: config.isGoogleEnable, + ldap: config.isLDAPEnable, + email: config.isEmailEnable, allowemailregister: config.allowemailregister, signin: req.isAuthenticated(), infoMessage: req.flash('info'), @@ -89,14 +89,14 @@ function responseHackMD (res, note) { title: title, useCDN: config.usecdn, allowAnonymous: config.allowanonymous, - facebook: config.facebook, - twitter: config.twitter, - github: config.github, - gitlab: config.gitlab, - dropbox: config.dropbox, - google: config.google, - ldap: config.ldap, - email: config.email, + facebook: config.isFacebookEnable, + twitter: config.isTwitterEnable, + github: config.isGitHubEnable, + gitlab: config.isGitLabEnable, + dropbox: config.isDropboxEnable, + google: config.isGoogleEnable, + ldap: config.isLDAPEnable, + email: config.isEmailEnable, allowemailregister: config.allowemailregister }) } |