summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYukai Huang2017-01-14 19:05:54 +0800
committerYukai Huang2017-01-14 19:05:54 +0800
commit0f833f099f61b93e76a5f32175580fc2c0b9dc1a (patch)
tree631a4c6e38f2c0087ca06a527ebf563b44d26171
parent04292240d6a589c537afb8e9838dcc0f062d0f2c (diff)
Update server google/dropbox config check
Diffstat (limited to '')
-rw-r--r--lib/config.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/config.js b/lib/config.js
index 53497f1f..c0a7fffe 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -90,11 +90,11 @@ var gitlab = (process.env.HMD_GITLAB_CLIENTID && process.env.HMD_GITLAB_CLIENTSE
var dropbox = (process.env.HMD_DROPBOX_CLIENTID && process.env.HMD_DROPBOX_CLIENTSECRET) ? {
clientID: process.env.HMD_DROPBOX_CLIENTID,
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET
-} : config.dropbox || false;
+} : (config.dropbox && config.dropbox.clientID && config.dropbox.clientSecret) || false;
var google = (process.env.HMD_GOOGLE_CLIENTID && process.env.HMD_GOOGLE_CLIENTSECRET) ? {
clientID: process.env.HMD_GOOGLE_CLIENTID,
clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET
-} : config.google || false;
+} : (config.google && config.google.clientID && config.google.clientSecret) || false;
var imgur = process.env.HMD_IMGUR_CLIENTID || config.imgur || false;
var email = process.env.HMD_EMAIL ? (process.env.HMD_EMAIL === 'true') : !!config.email;