mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
fix: fix import postman
This commit is contained in:
parent
249ff22907
commit
feb63c1554
@ -54,6 +54,37 @@ class ProjectData extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
parseUrl(url){
|
||||
let parser = document.createElement('a');
|
||||
parser.href = url;
|
||||
return {
|
||||
protocol: parser.protocol,
|
||||
hostname: parser.hostname,
|
||||
port: parser.port,
|
||||
pathname: parser.pathname,
|
||||
search: parser.search,
|
||||
host: parser.host
|
||||
}
|
||||
}
|
||||
|
||||
importPostman(data){
|
||||
var a = {
|
||||
path: '/api/aa',
|
||||
queryParams: []
|
||||
}
|
||||
|
||||
a.path = a.path.indexOf('/api') === 0 ? a.path.substr('/api'.length) : a.path
|
||||
|
||||
return {
|
||||
path: a.path,
|
||||
query: queryParams
|
||||
}
|
||||
}
|
||||
|
||||
async handleAddInterface(){
|
||||
let data = await axios.post('/api/')
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
@ -820,6 +820,8 @@ class interfaceController extends baseController {
|
||||
|
||||
return ctx.body = yapi.commons.resReturn(successNum);
|
||||
}
|
||||
|
||||
|
||||
async getCatMenu(ctx) {
|
||||
let project_id = ctx.request.query.project_id;
|
||||
if(!project_id){
|
||||
|
Loading…
Reference in New Issue
Block a user