Proxy the fahrplan
This commit is contained in:
parent
e5245d82a0
commit
0978d1df8d
2 changed files with 14 additions and 0 deletions
10
server/route/35c3.js
Normal file
10
server/route/35c3.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
require('isomorphic-fetch');
|
||||
|
||||
module.exports = (router) => {
|
||||
router.get('/35c3/fahrplan', async (ctx) => {
|
||||
const res = await fetch('https://fahrplan.events.ccc.de/congress/2018/Fahrplan/schedule.json');
|
||||
ctx.assert((res.status === 200), res.status);
|
||||
const body = await res.json();
|
||||
ctx.body = body;
|
||||
});
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue