Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default (req: NextApiRequest, res: NextApiResponse) => {
try {
const result = compiler.compileDefinitionString(req.body);
res.status(200).send(beautify(result));
} catch (e) {
res.status(500).send(e.message);
}
};