|
|
@@ -227,6 +227,7 @@ module.exports = function(crowi, app) {
|
|
|
};
|
|
|
|
|
|
actions.pageShowForCrowiPlus = function(req, res) {
|
|
|
+ var UpdatePost = crowi.model('UpdatePost');
|
|
|
var path = getPathFromRequest(req);
|
|
|
|
|
|
var limit = 50;
|
|
|
@@ -270,6 +271,15 @@ module.exports = function(crowi, app) {
|
|
|
return res.redirect(encodeURI(page.redirectTo + '?redirectFrom=' + pagePathUtil.encodePagePath(page.path)));
|
|
|
}
|
|
|
|
|
|
+ let slackChannels = '';
|
|
|
+ UpdatePost.findSettingsByPath(path)
|
|
|
+ .then(function(data) {
|
|
|
+ slackChannels = data[0].channel;
|
|
|
+ page.updateSlackChannel(slackChannels).then(function() {}).catch(function() {});
|
|
|
+ }).catch(function(err) {
|
|
|
+ debug('Error occured while get setting', err);
|
|
|
+ });
|
|
|
+
|
|
|
renderVars.page = page;
|
|
|
|
|
|
if (page) {
|