mirror of
https://github.com/ritz078/transform.git
synced 2026-11-27 02:59:48 +03:00
* updated dependencies * fix(ts-schema): typescript to JSON Schema now working fix #182 * added more data in typescript value * updated svgr * updated jsonld * update dependencies * added stale bot * fixes * fixes * fixes
13 lines
356 B
TypeScript
13 lines
356 B
TypeScript
import { NextApiRequest, NextApiResponse } from "next";
|
|
import html2pug from "html2pug";
|
|
|
|
export default (req: NextApiRequest, res: NextApiResponse) => {
|
|
try {
|
|
const { value, settings } = JSON.parse(req.body);
|
|
const result = html2pug(value, settings);
|
|
res.status(200).send(result);
|
|
} catch (e) {
|
|
res.status(500).send(e.message);
|
|
}
|
|
};
|