Google Sheets as a Reporting Tool: Sheets API

Go to Lab

991 Reviews

I made two adjustments in order to complete this lab: Adjustment 1: At the instruction: Open the file views/layout.handlebars, which defines the layout for each page, and add the following code to the end of the <head> tag underneath the section that says <!-- TODO: Add Google Sign-in button -->: I actually had to add the code underneath the section that says <!-- TODO: Add Google Sign-in library --> Adjustment 2: The given code: // TODO: Add route for syncing spreadsheet.'/spreadsheets/:id/sync', function(req, res, next) { var auth = req.get('Authorization'); if (!auth) { return next(Error('Authorization required.')); } var accessToken = auth.split(' ')[1]; var helper = new SheetsHelper(accessToken); Sequelize.Promise.all([ models.Spreadsheet.findById(, models.Order.findAll() ]).then(function(results) { var spreadsheet = results[0]; var orders = results[1]; helper.sync(, spreadsheet.sheetId, orders, function(err) { if (err) { return next(err); } return res.json(orders.length); }); }); }); Did not work with the given environment. I had to replace the line: models.Spreadsheet.findById(, with: models.Spreadsheet.findByPk(, Other than this, the lab is helpful.

Chokechai P. · Reviewed about 10 hours ago

Vaidehi K. · Reviewed about 10 hours ago

Tarun Kumar Y. · Reviewed about 12 hours ago

Rakshitha S. · Reviewed about 19 hours ago

Prasad M. · Reviewed about 22 hours ago

Phuong N. · Reviewed 2 days ago

Matías P. · Reviewed 2 days ago

Daniella G. · Reviewed 3 days ago

Noelia B. · Reviewed 3 days ago

Good Going

jashwant k. · Reviewed 3 days ago

Pablo F. · Reviewed 3 days ago

mohammed B. · Reviewed 4 days ago

please update the code, i got this error "models.Spreadsheet.findById is not a function" while i clicked button sync.

Nurlaela N. · Reviewed 4 days ago

karan k. · Reviewed 4 days ago

David M. · Reviewed 4 days ago

Robin A. · Reviewed 4 days ago

Zahid Q. · Reviewed 4 days ago

Puneet B. · Reviewed 4 days ago

SUBHASH K. · Reviewed 4 days ago

SANDHYA Y. · Reviewed 4 days ago

sushil K. · Reviewed 4 days ago

Byungjun K. · Reviewed 5 days ago

Rohan D. · Reviewed 5 days ago

NIKHIL S. · Reviewed 5 days ago


AMAN Y. · Reviewed 5 days ago