From ce66b546444462bc6055377d7b97ad2c9fb36823 Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Sun, 12 Jan 2020 00:03:32 +0530 Subject: [PATCH] fixes --- pages/api/typescript-to-json-schema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/api/typescript-to-json-schema.ts b/pages/api/typescript-to-json-schema.ts index e9ff18d..3cc4fed 100644 --- a/pages/api/typescript-to-json-schema.ts +++ b/pages/api/typescript-to-json-schema.ts @@ -29,6 +29,8 @@ export default (req: NextApiRequest, res: NextApiResponse) => { createFormatter(config) ); const schema = generator.createSchema("*"); + + fs.unlink(filePath, () => {}); res.status(200).send(schema); } catch (e) { res.status(500).send(e.message);