This commit is contained in:
les
2019-08-25 14:34:26 +02:00
parent 0de68b5054
commit 0eb41a1e12
13 changed files with 48 additions and 105 deletions

View File

@@ -21,7 +21,6 @@ router.get('/m/:event_id', async (req, res) => {
const event_id = req.params.event_id
if (req.accepts('html')) return res.redirect(301, `/event/${event_id}`)
console.error('Not asked for html!')
const event = await Event.findByPk(req.params.event_id, { include: [ User ] })
if (!event) return res.status(404).send('Not found')
return res.json(event.toAP(event.user.username))