mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:37:08 +00:00
In short: POST creates a new project PUT overwrites a project configuration with a new one PATCH merges the request body with the existing configuration
17 lines
289 B
JavaScript
17 lines
289 B
JavaScript
|
|
const { project } = require('../../../../lib/db');
|
|
|
|
module.exports = async function (req, res, next) {
|
|
|
|
try {
|
|
// TODO
|
|
// Implement If-Match header requirements
|
|
res.send(await project.configuration.put(req.params.project, req.body));
|
|
next();
|
|
} catch (err) {
|
|
next(err);
|
|
}
|
|
|
|
|
|
};
|