Update server google/dropbox config check

This commit is contained in:
Yukai Huang 2017-01-14 19:05:54 +08:00
parent 04292240d6
commit 0f833f099f
1 changed files with 2 additions and 2 deletions

View File

@ -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) ? { var dropbox = (process.env.HMD_DROPBOX_CLIENTID && process.env.HMD_DROPBOX_CLIENTSECRET) ? {
clientID: process.env.HMD_DROPBOX_CLIENTID, clientID: process.env.HMD_DROPBOX_CLIENTID,
clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET 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) ? { var google = (process.env.HMD_GOOGLE_CLIENTID && process.env.HMD_GOOGLE_CLIENTSECRET) ? {
clientID: process.env.HMD_GOOGLE_CLIENTID, clientID: process.env.HMD_GOOGLE_CLIENTID,
clientSecret: process.env.HMD_GOOGLE_CLIENTSECRET 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 imgur = process.env.HMD_IMGUR_CLIENTID || config.imgur || false;
var email = process.env.HMD_EMAIL ? (process.env.HMD_EMAIL === 'true') : !!config.email; var email = process.env.HMD_EMAIL ? (process.env.HMD_EMAIL === 'true') : !!config.email;