mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
12 lines
291 B
JavaScript
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;
|
|
}
|
|
}
|
|
})
|
|
} |