Show development activity log.

A button in the help dialogue takes the user to the
/feed/… frontend URL, where the latest development
activity is shown, taken from the GitLab RSS feed
for the project.
This commit is contained in:
D. Berge
2021-05-08 00:46:31 +02:00
parent 983113b6cc
commit 7bb3a3910b
7 changed files with 151 additions and 2 deletions

View File

@@ -183,6 +183,9 @@ app.map({
get: [ mw.gis.navdata.get ]
}
},
'/rss/': {
get: [ mw.rss.get ]
}
//
// '/user': {
// get: [ mw.user.get ],

View File

@@ -12,5 +12,6 @@ module.exports = {
configuration: require('./configuration'),
info: require('./info'),
meta: require('./meta'),
openapi: require('./openapi')
openapi: require('./openapi'),
rss: require('./rss')
};

View File

@@ -0,0 +1,21 @@
const fetch = require('node-fetch');
module.exports = async function (req, res, next) {
try {
if (req.query.remote) {
// We're being asked to fetch a remote feed
// NOTE: No, we don't limit what feeds the user can fetch
const r = await fetch(req.query.remote);
if (r && r.ok) {
res.set("Content-Type", "application/xml");
res.send(await r.text());
return;
}
}
res.status(400).send();
} catch (err) {
next(err);
}
}

View File

@@ -0,0 +1,4 @@
module.exports = {
get: require('./get')
}