v1.18.x
barisusakli 9 years ago
parent 1449d438f5
commit 80fd0b20bd

@ -246,35 +246,10 @@ function setupDefaultConfigs(next) {
return next(err); return next(err);
} }
if (install.values) { meta.configs.init(next);
async.parallel([
async.apply(setIfPaired, 'social:twitter:key', 'social:twitter:secret'),
async.apply(setIfPaired, 'social:google:id', 'social:google:secret'),
async.apply(setIfPaired, 'social:facebook:app_id', 'social:facebook:secret')
], function(err) {
if (err) {
return next(err);
}
meta.configs.init(next);
});
} else {
meta.configs.init(next);
}
}); });
} }
function setIfPaired(key1, key2, callback) {
var meta = require('./meta');
if (install.values[key1] && install.values[key2]) {
async.parallel([
async.apply(meta.configs.setOnEmpty, key1, install.values[key1]),
async.apply(meta.configs.setOnEmpty, key2, install.values[key2])
], callback);
} else {
callback();
}
}
function enableDefaultTheme(next) { function enableDefaultTheme(next) {
var meta = require('./meta'); var meta = require('./meta');

Loading…
Cancel
Save