Display a modal when the user clicks the cancel button on the list of events. Check if that modal already exist and adapt it if necessary.
The DELETE endpoint should be changed from '/:userId/:eventId' to /:eventId and it should pass the userId from req.
Add validation to the function to check if the user is an admin and return 403 if they aren't.
Display a modal when the user clicks the cancel button on the list of events. Check if that modal already exist and adapt it if necessary.
The DELETE endpoint should be changed from
'/:userId/:eventId'
to/:eventId
and it should pass theuserId
fromreq
. Add validation to the function to check if the user is an admin and return 403 if they aren't.