mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
refactor(config.js): Extract config file
* Separate different config source to each files * Freeze config object
This commit is contained in:
parent
4738ba7d36
commit
ecb0533605
15 changed files with 767 additions and 618 deletions
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue