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

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

	try {
		const payload = req.body;

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

};
