mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:37:08 +00:00
Add /version/history endpoint to API.
Retrieves Git tag annotations.
This commit is contained in:
15
lib/www/server/api/middleware/version/history/get.js
Normal file
15
lib/www/server/api/middleware/version/history/get.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
const version = require('../../../../lib/version');
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
|
||||
try {
|
||||
const v = await version.history(req.query.count, req.query.lines);
|
||||
res.status(200).json(v);
|
||||
} catch (err) {
|
||||
next(err);
|
||||
return;
|
||||
}
|
||||
next();
|
||||
|
||||
};
|
||||
4
lib/www/server/api/middleware/version/history/index.js
Normal file
4
lib/www/server/api/middleware/version/history/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
module.exports = {
|
||||
get: require('./get'),
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
module.exports = {
|
||||
get: require('./get')
|
||||
get: require('./get'),
|
||||
history: require('./history'),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user