Always send JSON responses

This commit is contained in:
Ben Grant 2022-08-20 21:52:09 +10:00
parent 7d0f3898de
commit 4ab944b13c
9 changed files with 20 additions and 19 deletions

View file

@ -77,7 +77,7 @@ const createEvent = async (req, res) => {
}
} catch (e) {
console.error(e)
res.sendStatus(400)
res.status(400).send({ error: 'An error occurred while creating the event' })
}
}