Commit a5462904 authored by les's avatar les
Browse files

minor

parent 6fdda999
......@@ -291,7 +291,7 @@ const eventController = {
}
const body = req.body
const event = await Event.findByPk(body.id)
if (!event) return res.sendStatus(404)
if (!event) { return res.sendStatus(404) }
if (!req.user.is_admin && event.userId !== req.user.id) {
return res.sendStatus(403)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment