Always send JSON responses
This commit is contained in:
parent
7d0f3898de
commit
4ab944b13c
9 changed files with 20 additions and 19 deletions
|
|
@ -18,11 +18,11 @@ const getEvent = async (req, res) => {
|
|||
visited: dayjs().unix()
|
||||
})
|
||||
} else {
|
||||
res.sendStatus(404)
|
||||
res.status(404).send({ error: 'Event not found' })
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
res.sendStatus(404)
|
||||
res.status(404).send({ error: 'Event not found' })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue