From 8a82c69419dc358fbaeab322c32d18ee84656feb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 5 Sep 2022 21:08:53 -0700 Subject: missing imports and fastify err responses --- routes/invoices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes/invoices.js') diff --git a/routes/invoices.js b/routes/invoices.js index bb65f811..e1948c0b 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -95,7 +95,7 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { res.send(invoice); } catch (e) { err(e.message, e.stack); - res.status(500).send(`Problem during invoice creation: ${e.message}`); + res.code(500).send(`Problem during invoice creation: ${e.message}`); } }); -- cgit v1.2.3