egg-born-module-a-base-sync
Advanced tools
Comparing version 4.8.48 to 4.8.49
@@ -35,2 +35,4 @@ module.exports = app => { | ||
async write({ atomClass, target, key, item, options, user }) { | ||
// check demo | ||
this.ctx.bean.util.checkDemoForAtomWrite(); | ||
// super | ||
@@ -37,0 +39,0 @@ await super.write({ atomClass, target, key, item, options, user }); |
@@ -88,6 +88,3 @@ module.exports = app => { | ||
// check demo | ||
const ctxCaller = this.ctx.ctxCaller; | ||
if (ctxCaller && ctxCaller.path === '/api/a/base/atom/write') { | ||
this.ctx.bean.util.checkDemo(); | ||
} | ||
this.ctx.bean.util.checkDemoForAtomWrite(); | ||
// roleIdParent maybe string, so cause validate error | ||
@@ -94,0 +91,0 @@ delete item.roleIdParent; |
@@ -63,6 +63,3 @@ module.exports = app => { | ||
// check demo | ||
const ctxCaller = this.ctx.ctxCaller; | ||
if (ctxCaller && ctxCaller.path === '/api/a/base/atom/write') { | ||
this.ctx.bean.util.checkDemo(); | ||
} | ||
this.ctx.bean.util.checkDemoForAtomWrite(); | ||
// super | ||
@@ -69,0 +66,0 @@ await super.write({ atomClass, target, key, item, options, user }); |
@@ -168,2 +168,11 @@ const require3 = require('require3'); | ||
checkDemoForAtomWrite(throwError = true) { | ||
const ctxCaller = this.ctx.ctxCaller; | ||
if (!ctxCaller) return true; | ||
if (ctxCaller.path === '/api/a/base/atom/write' || ctxCaller.path === '/api/a/base/atom/writeSubmit') { | ||
return this.checkDemo(throwError); | ||
} | ||
return true; | ||
} | ||
escapeHtml(str) { | ||
@@ -170,0 +179,0 @@ return utils.escapeHtml(str); |
@@ -15,3 +15,3 @@ module.exports = { | ||
CommentPublishTitleEditReplyComment: 'Modified the comment replied before', | ||
DisabledOnDemoMode: 'Disabled on Demo Mode', | ||
DisabledOnDemoMode: 'Disabled on Demo Mode, please create a local project to experience', | ||
CloneCopyText: 'Copy', | ||
@@ -18,0 +18,0 @@ KeyForAtom: 'Key', |
@@ -50,3 +50,3 @@ module.exports = { | ||
CommentPublishTitleEditReplyComment: '修改了回复的评论', | ||
DisabledOnDemoMode: '演示模式中禁用', | ||
DisabledOnDemoMode: '演示模式中禁用,请创建本地项目进行体验', | ||
Draft: '草稿', | ||
@@ -53,0 +53,0 @@ Drafts: '草稿', |
{ | ||
"name": "egg-born-module-a-base-sync", | ||
"version": "4.8.48", | ||
"version": "4.8.49", | ||
"title": "Base", | ||
@@ -5,0 +5,0 @@ "eggBornModule": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3729241
61520