mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:37:08 +00:00
Initial commit
This commit is contained in:
9
lib/www/server/api/middleware/project/get.js
Normal file
9
lib/www/server/api/middleware/project/get.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
const { project} = require('../../../lib/db');
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
|
||||
res.status(200).send(await project.summary(req.params.project));
|
||||
next();
|
||||
|
||||
};
|
||||
4
lib/www/server/api/middleware/project/index.js
Normal file
4
lib/www/server/api/middleware/project/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
list: require('./list'),
|
||||
get: require('./get')
|
||||
};
|
||||
9
lib/www/server/api/middleware/project/list.js
Normal file
9
lib/www/server/api/middleware/project/list.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
const { project} = require('../../../lib/db');
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
|
||||
res.status(200).send(await project.list());
|
||||
next();
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user