fork from bc4552c5a8
This commit is contained in:
12
exts/yapi-plugin-import-swagger/server.js
Normal file
12
exts/yapi-plugin-import-swagger/server.js
Normal file
@@ -0,0 +1,12 @@
|
||||
module.exports = function(){
|
||||
this.bindHook('import_data', function(importDataModule){
|
||||
importDataModule.swagger = async (res)=>{
|
||||
try{
|
||||
return await require('./run.js')(res)
|
||||
}catch(err){
|
||||
this.commons.log(err, 'error')
|
||||
return false;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user