mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
add cid to widgets.render
init date pickers in widgets ACP
This commit is contained in:
@@ -109,22 +109,17 @@ apiController.getConfig = function (req, res, next) {
|
||||
|
||||
|
||||
apiController.renderWidgets = function (req, res, next) {
|
||||
var areas = {
|
||||
template: req.query.template,
|
||||
locations: req.query.locations,
|
||||
url: req.query.url
|
||||
};
|
||||
|
||||
if (!areas.template || !areas.locations) {
|
||||
if (!req.query.template || !req.query.locations) {
|
||||
return res.status(200).json({});
|
||||
}
|
||||
|
||||
widgets.render(req.uid,
|
||||
{
|
||||
template: areas.template,
|
||||
url: areas.url,
|
||||
locations: areas.locations,
|
||||
isMobile: req.query.isMobile === 'true'
|
||||
template: req.query.template,
|
||||
url: req.query.url,
|
||||
locations: req.query.locations,
|
||||
isMobile: req.query.isMobile === 'true',
|
||||
cid: req.query.cid
|
||||
},
|
||||
req,
|
||||
res,
|
||||
|
||||
Reference in New Issue
Block a user