Apply future test database GET endpoint.

pull/1/head
sigonasr2, Sig, Sigo 3 years ago
parent fc7d9752e0
commit 8a1eb8c3d5
  1. 10
      server.js

@ -192,6 +192,16 @@ const ENDPOINTDATA=[
}
]
app.get("/"+databases,(req,res)=>{
db.query('select * from pg_database where datname like \'ngsplanner%\' limit 100')
.then((data)=>{
res.status(200).json(data.rows)
})
.catch((err)=>{
res.status(500).send(err.message)
})
})
function CreateDynamicEndpoints() {
ENDPOINTDATA.map((endpoint)=>{
app.get("/"+endpoint.endpoint,(req,res)=>{

Loading…
Cancel
Save