1
I can’t figure out how to get back a Password in Javascript.
In the example below, how to get the return of const info
?
const GoogleSpreadSheet = require('google-spreadsheet');
const credentials = require('../credenciais.json');
const { promisify } = require('util');
const acessoPlanilha = async() => {
const planilha = new GoogleSpreadSheet(planilhaID);
await promisify(planilha.useServiceAccountAuth)(credentials);
const info = await promisify(planilha.getInfo)();
return info;
}
const info = acessoPlanilha();
console.log(info);
//terminal: Promise { <pending> }
Would that be the code? Let result; const info = accessPlanilha(); info.then(result => result = result, err => console.log(err)); console.log(info); console.log(result);
– luanfvieira