mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
widget render change
This commit is contained in:
@@ -98,21 +98,15 @@ apiController.renderWidgets = function(req, res, next) {
|
||||
return res.json(200, {});
|
||||
}
|
||||
|
||||
async.each(areas.locations, function(location, next) {
|
||||
widgets.render(uid, {
|
||||
template: areas.template,
|
||||
url: areas.url,
|
||||
location: location
|
||||
}, function(err, widgets) {
|
||||
renderedWidgets.push({
|
||||
location: location,
|
||||
widgets: widgets
|
||||
});
|
||||
|
||||
next();
|
||||
});
|
||||
}, function(err) {
|
||||
res.json(200, renderedWidgets);
|
||||
widgets.render(uid, {
|
||||
template: areas.template,
|
||||
url: areas.url,
|
||||
locations: areas.locations
|
||||
}, function(err, widgets) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
res.json(200, widgets);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user