event's API support update and image_url

This commit is contained in:
les
2020-05-14 22:36:58 +02:00
parent 34395c3d66
commit 22381d1fe6
7 changed files with 300 additions and 232 deletions

View File

@@ -86,8 +86,7 @@ api.put('/place', isAdmin, eventController.updatePlace)
* @param {array} [recurrent.days] - array of days
* @param {image} [image] - Image
*/
api.post('/event', upload.single('image'), eventController.add)
api.post('/event', hasPerm('event:write'), upload.single('image'), eventController.add)
api.put('/event', hasPerm('event:write'), upload.single('image'), eventController.update)
// remove event