
const { project } = require('../../../lib/db');

module.exports = async function (req, res, next) {

	try {
		const payload = req.body;

		const projectDefinition = await project.post(payload);
		res.status(201).send(projectDefinition);
		next();
	} catch (err) {
		next(err);
	}

};
