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

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

	try {
		const payload = req.body;

		await event.post(req.params.project, payload, req.query);
		res.status(201).send();
		next();
	} catch (err) {
		next(err);
	}

};
