diff --git a/client/components/Postman/Postman.js b/client/components/Postman/Postman.js index 20af53a1..d7046ec7 100755 --- a/client/components/Postman/Postman.js +++ b/client/components/Postman/Postman.js @@ -552,7 +552,7 @@ export default class Run extends Component {
[手动下载] zip 文件解压后将 crx 文件拖入到 chrome://extensions/ { + yapi.commons.saveLog({ + content: `用户 "${username}" 在接口集 "${col.name}" 下导入了接口 ${data.casename}`, + type: 'project', + uid: this.getUid(), + username: username, + typeid: params.project_id + }); + }); + } + + this.projectModel.up(params.project_id,{up_time: new Date().getTime()}).then(); + + ctx.body = yapi.commons.resReturn('ok'); + + }catch(e){ + ctx.body = yapi.commons.resReturn(null, 402, e.message); + } + } + /** * 更新一个接口用例 * @interface /col/up_case diff --git a/server/router.js b/server/router.js index 2a39ff8b..212cae5a 100755 --- a/server/router.js +++ b/server/router.js @@ -244,6 +244,11 @@ let routerConfig = { "path": "add", "method": "post" }, + { + "action": "downloadCrx", + "path" : "download_crx", + "method": "get" + }, { "action": "getCatMenu", "path": "getCatMenu", @@ -320,6 +325,11 @@ let routerConfig = { action: "addCol", path: "add_col", method: "post" + },{ + action: 'addCaseList', + path: 'add_case_list', + method: 'post' + }, { action: "list", path: "list",