Files
dougal-software/lib/www/server/api/middleware/info/post.js

17 lines
299 B
JavaScript
Raw Normal View History

2021-05-20 18:17:52 +02:00
const { info } = require('../../../lib/db');
module.exports = async function (req, res, next) {
try {
const payload = req.body;
await info.post(req.params.project, req.params.path, payload, undefined, req.user.role);
2021-05-20 18:17:52 +02:00
res.status(201).send();
next();
} catch (err) {
next(err);
}
};