This commit is contained in:
lesion 2019-07-04 01:20:32 +02:00
parent c60072538e
commit 890c341d9e
2 changed files with 5 additions and 3 deletions

View file

@ -105,6 +105,7 @@ const eventController = {
},
async confirm(req, res) {
console.error('confirm event')
const id = Number(req.params.event_id)
const event = await Event.findByPk(id)
if (!event) return res.sendStatus(404)

View file

@ -86,13 +86,14 @@ api.delete('/event/notification/:code', eventController.delNotification)
api.get('/settings', settingsController.getAllRequest)
api.post('/settings', jwt, fillUser, isAdmin, settingsController.setRequest)
// get event
api.get('/event/:event_id', jwt, fillUser, eventController.get)
// confirm event
api.get('/event/confirm/:event_id', jwt, isAuth, isAdmin, eventController.confirm)
api.get('/event/unconfirm/:event_id', jwt, isAuth, isAdmin, eventController.unconfirm)
// get event
api.get('/event/:event_id', jwt, fillUser, eventController.get)
// export events (rss/ics)
api.get('/export/:type', exportController.export)