Browse Source

proc list

pull/122/head
Zbynek Rybicka 6 years ago committed by Jeremy Nagel
parent
commit
9de467a7a4
  1. 13
      lib/xapi.js

13
lib/xapi.js

@ -345,6 +345,11 @@ class Xapi {
stat.apis += 2;
/**************** 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 =
" Generated: " +
stat.apis +
@ -487,6 +492,14 @@ class Xapi {
}
/**************** 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

Loading…
Cancel
Save