no what
This commit is contained in:
parent
af37f779ef
commit
5bec55e0c2
1 changed files with 2 additions and 10 deletions
|
@ -1,5 +1,4 @@
|
|||
import express from 'express';
|
||||
import { createProxyMiddleware } from 'http-proxy-middleware';
|
||||
|
||||
import config from "../eventmapper_config.json" with { type: "json" };
|
||||
|
||||
|
@ -10,20 +9,13 @@ app.use("/assets", express.static('assets'));
|
|||
app.use("/", express.static('pages'));
|
||||
|
||||
app.get('/files/*', async (req, res) => {
|
||||
console.log(req.params);
|
||||
// Get events
|
||||
let eventsReq = await fetch(new URL(req.params[0], config.files_url));
|
||||
let events;
|
||||
if (eventsReq.ok)
|
||||
events = await eventsReq.arrayBuffer();
|
||||
else
|
||||
return res.status(eventsReq.status).send(await eventsReq.text());
|
||||
|
||||
console.log(events);
|
||||
let events = await eventsReq.arrayBuffer();
|
||||
|
||||
res.type(eventsReq.headers.get("Content-Type"));
|
||||
|
||||
return res.send(Buffer.from(events));
|
||||
return res.status(eventsReq.status).send(Buffer.from(events));
|
||||
})
|
||||
|
||||
app.get('/data/:lang/events/:floor', async (req, res) => {
|
||||
|
|
Loading…
Reference in a new issue