fix type errors

This commit is contained in:
Thomas Ruoff
2021-11-24 12:00:39 +01:00
parent 04b6729625
commit 9a470a52a3
4 changed files with 17 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
await renderer(id, texDoc)
const storeData = { ...templateData, id, created: new Date().toISOString(), template: templateName }
res.status(200).json({ id: id, data: storeData })
} catch (err) {
} catch (err: any) {
console.error('Error:', err, 'for', req.url)
res.status(500).json({ error: err.toString() })
}