yapi/exts/yapi-plugin-import-swagger/server.js
2018-04-28 14:03:47 +08:00

12 lines
291 B
JavaScript

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;
}
}
})
}