From 1b29578513c7e4665728cec3670dd2a39913498a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E6=96=87=E9=9B=84?= Date: Mon, 11 Nov 2019 11:39:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AB=AF=E5=AF=BC=E5=85=A5=20basePath=20=E8=AE=BE=E7=BD=AE=20b?= =?UTF-8?q?ug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/HandleImportData.js | 3 ++- server/controllers/base.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/HandleImportData.js b/common/HandleImportData.js index 59d1f142..d6ab1ff3 100644 --- a/common/HandleImportData.js +++ b/common/HandleImportData.js @@ -82,7 +82,8 @@ async function handle( await axios.post(projectApiPath, { id: projectId, - basepath: info.basePath + basepath: info.basePath, + token }) } diff --git a/server/controllers/base.js b/server/controllers/base.js index 24d9b05a..4aeef051 100755 --- a/server/controllers/base.js +++ b/server/controllers/base.js @@ -50,7 +50,8 @@ class baseController { '/api/interface/getCatMenu', '/api/interface/list_cat', '/api/project/get', - '/api/plugin/export' + '/api/plugin/export', + '/api/project/up' ]; let params = Object.assign({}, ctx.query, ctx.request.body); @@ -58,6 +59,7 @@ class baseController { // 如果前缀是 /api/open,执行 parse token 逻辑 if (token && (openApiRouter.indexOf(ctx.path) > -1 || ctx.path.indexOf('/api/open/') === 0 )) { + let tokens = parseToken(token) const oldTokenUid = '999999'