mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:37:08 +00:00
Add API endpoint for patching a project
This commit is contained in:
@@ -3,6 +3,6 @@ module.exports = {
|
||||
get: require('./get'),
|
||||
// post: require('./post'),
|
||||
// put: require('./put'),
|
||||
// patch: require('./patch'),
|
||||
patch: require('./patch'),
|
||||
// delete: require('./delete'),
|
||||
};
|
||||
|
||||
16
lib/www/server/api/middleware/project/configuration/patch.js
Normal file
16
lib/www/server/api/middleware/project/configuration/patch.js
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
const { project } = require('../../../../lib/db');
|
||||
|
||||
module.exports = async function (req, res, next) {
|
||||
|
||||
try {
|
||||
// TODO
|
||||
// Implement If-Match header requirements
|
||||
res.send(await project.configuration.patch(req.params.project, req.body));
|
||||
next();
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user