Skip to content

Commit

Permalink
fix: 修复服务端导入 basePath 设置 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
苏文雄 committed Nov 11, 2019
1 parent 96fe7ee commit 1b29578
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion common/HandleImportData.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ async function handle(

await axios.post(projectApiPath, {
id: projectId,
basepath: info.basePath
basepath: info.basePath,
token
})
}

Expand Down
4 changes: 3 additions & 1 deletion server/controllers/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ 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);
let token = params.token;

// 如果前缀是 /api/open,执行 parse token 逻辑
if (token && (openApiRouter.indexOf(ctx.path) > -1 || ctx.path.indexOf('/api/open/') === 0 )) {

let tokens = parseToken(token)

const oldTokenUid = '999999'
Expand Down

0 comments on commit 1b29578

Please sign in to comment.