|
|
@@ -6,6 +6,7 @@ module.exports = function(crowi, app) {
|
|
|
, pagePathUtils = require('@commons/util/page-path-utils')
|
|
|
, Page = crowi.model('Page')
|
|
|
, User = crowi.model('User')
|
|
|
+ , Tag = crowi.model('Tag')
|
|
|
, Config = crowi.model('Config')
|
|
|
, config = crowi.getConfig()
|
|
|
, Bookmark = crowi.model('Bookmark')
|
|
|
@@ -105,6 +106,10 @@ module.exports = function(crowi, app) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ function updateTags(page, user, pageTags, updateOrCreate, previousRevision) {
|
|
|
+ Tag.createTag(pageTags);
|
|
|
+ }
|
|
|
+
|
|
|
function addRendarVarsForPage(renderVars, page) {
|
|
|
renderVars.page = page;
|
|
|
renderVars.path = page.path;
|
|
|
@@ -654,6 +659,11 @@ module.exports = function(crowi, app) {
|
|
|
if (isSlackEnabled && slackChannels != null) {
|
|
|
await notifyToSlackByUser(page, req.user, slackChannels, 'update', previousRevision);
|
|
|
}
|
|
|
+
|
|
|
+ // set page tag
|
|
|
+ if (pageTags != null) {
|
|
|
+ await updateTags(page, req.user, pageTags, 'update', previousRevision);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
/**
|