mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
.
This commit is contained in:
parent
c60072538e
commit
890c341d9e
2 changed files with 5 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue