fix config field names

This commit is contained in:
Riku Rouvila
2017-07-08 18:20:46 +01:00
parent 286074f972
commit ecd80edb20

View File

@@ -18,15 +18,15 @@ function log(message) {
function addNewMemberToSheets(data, callback) { function addNewMemberToSheets(data, callback) {
var {name, email, address, postcode, city, handle} = data; var {name, email, address, postcode, city, handle} = data;
var doc = new GoogleSpreadsheet(config.google.spreadsheet_id); var doc = new GoogleSpreadsheet(config.google.spreadsheetId);
async.waterfall([ async.waterfall([
function setAuth(cb) { function setAuth(cb) {
console.log('Start Google Spreadsheed auth.'); console.log('Start Google Spreadsheed auth.');
doc.useServiceAccountAuth({ doc.useServiceAccountAuth({
clientEmail: config.google.clientEmail, client_email: config.google.clientEmail,
privateKey: config.google.privateKey private_key: config.google.privateKey
}, () => cb()); }, (err) => cb(err));
}, },
function getInfoAndWorksheets(cb) { function getInfoAndWorksheets(cb) {
console.log('Start Google Spreadsheet info fetch.'); console.log('Start Google Spreadsheet info fetch.');