|
|
@@ -277,8 +277,10 @@ module.exports = function(crowi, app) {
|
|
|
//}
|
|
|
if (notify.slack.on && notify.slack.channel) {
|
|
|
if (crowi.slack) {
|
|
|
- var message = crowi.slack.prepareSlackMessage(pageData, req.user, notify.slack.channel, updateOrCreate);
|
|
|
- crowi.slack.post(message).then(function(){}).catch(function(){});
|
|
|
+ notify.slack.channel.split(',').map(function(chan) {
|
|
|
+ var message = crowi.slack.prepareSlackMessage(pageData, req.user, chan, updateOrCreate);
|
|
|
+ crowi.slack.post(message).then(function(){}).catch(function(){});
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -495,6 +497,27 @@ module.exports = function(crowi, app) {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ /**
|
|
|
+ * @api {get} /pages.updatePost
|
|
|
+ * @apiName Get UpdatePost setting list
|
|
|
+ * @apiGroup Page
|
|
|
+ *
|
|
|
+ * @apiParam {String} path
|
|
|
+ */
|
|
|
+ api.getUpdatePost = function(req, res) {
|
|
|
+ var path = req.body.path;
|
|
|
+ var UpdatePost = crowi.model('UpdatePost');
|
|
|
+
|
|
|
+ UpdatePost.findSettingsByPath(pageData.path)
|
|
|
+ .then(function(data) {
|
|
|
+ var result = {updatePost: data};
|
|
|
+ return res.json(ApiResponse.success(result));
|
|
|
+ }).catch(function(err) {
|
|
|
+ debug('Error occured while get setting', err);
|
|
|
+ return res.json(ApiResponse.error({}));
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
/**
|
|
|
* @api {post} /pages.rename Rename page
|
|
|
* @apiName SeenPage
|