more error handling, fix indentation

This commit is contained in:
Riku Rouvila
2017-07-08 18:21:21 +01:00
parent ecd80edb20
commit 3d7475be99

View File

@@ -31,7 +31,11 @@ function addNewMemberToSheets(data, callback) {
function getInfoAndWorksheets(cb) {
console.log('Start Google Spreadsheet info fetch.');
doc.getInfo(function(err, info) {
if(err) {
cb(err);
} else {
cb(null, info.worksheets[0]);
}
});
},
function addRow(sheet, cb) {