From ed7924efa8a6ee07dbd0c8270b49839230ce10b4 Mon Sep 17 00:00:00 2001 From: suxiaoxin Date: Fri, 29 Sep 2017 14:58:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Postman/Postman.js | 2 +- client/plugin-module.js | 2 +- server/controllers/interface.js | 8 ++++ server/controllers/interfaceCol.js | 60 ++++++++++++++++++++++++++++ server/router.js | 10 +++++ 5 files changed, 80 insertions(+), 2 deletions(-) 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",