|
@@ -156,12 +156,13 @@ module.exports = function(app) {
|
|
|
}
|
|
}
|
|
|
app.set('io').sockets.emit('page edited', {page: data, user: req.user});
|
|
app.set('io').sockets.emit('page edited', {page: data, user: req.user});
|
|
|
|
|
|
|
|
|
|
+ var redirectPath = encodeURI(path);
|
|
|
if (grant != data.grant) {
|
|
if (grant != data.grant) {
|
|
|
Page.updateGrant(data, grant, req.user, function (err, data) {
|
|
Page.updateGrant(data, grant, req.user, function (err, data) {
|
|
|
- return res.redirect(path);
|
|
|
|
|
|
|
+ return res.redirect(redirectPath);
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- return res.redirect(path);
|
|
|
|
|
|
|
+ return res.redirect(redirectPath);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
if (pageData) {
|
|
if (pageData) {
|