Try single endpoint

pull/10/head
sigonasr2, Sig, Sigo 3 years ago
parent 0582793805
commit dcd6e2c31f
  1. 2
      frontend/src/setupProxy.js
  2. 1
      server/app.js

@ -9,7 +9,7 @@ module.exports = function(app) {
}) })
);*/ );*/
app.use( app.use(
"/ngsplanner/*", "/ngsplanner/food",
createProxyMiddleware({ createProxyMiddleware({
target: 'https://server:4501', target: 'https://server:4501',
changeOrigin: true, changeOrigin: true,

@ -177,6 +177,7 @@ function CreateDynamicEndpoints() {
db2.query('select * from '+endpoint.endpoint+" order by id desc") db2.query('select * from '+endpoint.endpoint+" order by id desc")
.then((data)=>{ .then((data)=>{
res.status(200).json({fields:data.fields,rows:data.rows}) res.status(200).json({fields:data.fields,rows:data.rows})
co
}) })
.catch((err)=>{ .catch((err)=>{
res.status(500).send(err.message) res.status(500).send(err.message)

Loading…
Cancel
Save