|
|
@ -345,6 +345,11 @@ class Xapi { |
|
|
|
stat.apis += 2; |
|
|
|
stat.apis += 2; |
|
|
|
/**************** END : health and version ****************/ |
|
|
|
/**************** END : health and version ****************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************** START : call stored procedures ****************/ |
|
|
|
|
|
|
|
this.app.get('/_proc', this.asyncMiddleware(this.proc.bind(this))) |
|
|
|
|
|
|
|
stat.apis += 1 |
|
|
|
|
|
|
|
/**************** END : call stored procedures ****************/ |
|
|
|
|
|
|
|
|
|
|
|
let statStr = |
|
|
|
let statStr = |
|
|
|
" Generated: " + |
|
|
|
" Generated: " + |
|
|
|
stat.apis + |
|
|
|
stat.apis + |
|
|
@ -487,6 +492,14 @@ class Xapi { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**************** END : health and version ****************/ |
|
|
|
/**************** END : health and version ****************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async proc(req, res) { |
|
|
|
|
|
|
|
let query = 'SELECT table_name AS resource FROM information_schema.routines WHERE table_schema = ? '; |
|
|
|
|
|
|
|
let params = [this.config.database]; |
|
|
|
|
|
|
|
let results = await this.mysql.exec(query, params) |
|
|
|
|
|
|
|
res.status(200).json(results) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//expose class
|
|
|
|
//expose class
|
|
|
|