mirror of
https://github.com/YMFE/yapi.git
synced 2024-11-27 04:40:08 +08:00
接口更新没有变化时,不记录日志,避免cron多次导入swagger的接口时,导致动态里展示一大堆的无意义日志。
This commit is contained in:
parent
e425cbd7d1
commit
01c3e9a869
@ -628,6 +628,10 @@ class interfaceController extends baseController {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.catModel.get(interfaceData.catid).then(cate => {
|
this.catModel.get(interfaceData.catid).then(cate => {
|
||||||
|
let diffView2 = showDiffMsg(jsondiffpatch, formattersHtml, logData);
|
||||||
|
if (diffView2.length <= 0) {
|
||||||
|
return; // 没有变化时,不写日志
|
||||||
|
}
|
||||||
yapi.commons.saveLog({
|
yapi.commons.saveLog({
|
||||||
content: `<a href="/user/profile/${this.getUid()}">${username}</a>
|
content: `<a href="/user/profile/${this.getUid()}">${username}</a>
|
||||||
更新了分类 <a href="/project/${cate.project_id}/interface/api/cat_${
|
更新了分类 <a href="/project/${cate.project_id}/interface/api/cat_${
|
||||||
|
Loading…
Reference in New Issue
Block a user