Apply future test database GET endpoint.
This commit is contained in:
parent
fc7d9752e0
commit
8a1eb8c3d5
10
server.js
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() {
|
function CreateDynamicEndpoints() {
|
||||||
ENDPOINTDATA.map((endpoint)=>{
|
ENDPOINTDATA.map((endpoint)=>{
|
||||||
app.get("/"+endpoint.endpoint,(req,res)=>{
|
app.get("/"+endpoint.endpoint,(req,res)=>{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user