mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
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:
@@ -183,6 +183,9 @@ app.map({
|
||||
get: [ mw.gis.navdata.get ]
|
||||
}
|
||||
},
|
||||
'/rss/': {
|
||||
get: [ mw.rss.get ]
|
||||
}
|
||||
//
|
||||
// '/user': {
|
||||
// get: [ mw.user.get ],
|
||||
|
||||
@@ -12,5 +12,6 @@ module.exports = {
|
||||
configuration: require('./configuration'),
|
||||
info: require('./info'),
|
||||
meta: require('./meta'),
|
||||
openapi: require('./openapi')
|
||||
openapi: require('./openapi'),
|
||||
rss: require('./rss')
|
||||
};
|
||||
|
||||
21
lib/www/server/api/middleware/rss/get.js
Normal file
21
lib/www/server/api/middleware/rss/get.js
Normal 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);
|
||||
}
|
||||
}
|
||||
4
lib/www/server/api/middleware/rss/index.js
Normal file
4
lib/www/server/api/middleware/rss/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
module.exports = {
|
||||
get: require('./get')
|
||||
}
|
||||
Reference in New Issue
Block a user