Added req and res objects to the widget rendering process before callback in src/controllers/api.js

This commit is contained in:
Jon Garrison
2015-09-16 00:36:13 -07:00
parent f80a6350c4
commit 44c4925ceb
2 changed files with 13 additions and 7 deletions

View File

@@ -114,11 +114,15 @@ apiController.renderWidgets = function(req, res, next) {
return res.status(200).json({});
}
widgets.render(req.uid, {
template: areas.template,
url: areas.url,
locations: areas.locations
}, function(err, widgets) {
widgets.render(req.uid,
{
template: areas.template,
url: areas.url,
locations: areas.locations,
},
req,
res,
function(err, widgets) {
if (err) {
return next(err);
}