integreat-cms
integreat-cms copied to clipboard
Sending feedback for recurring events not working
Describe the Bug
The feedback endpoint only accepts event slugs which really exist in the database, so it fails for all recurring events where we generate a bunch of date-specific slugs.
Steps to Reproduce
- Create recurring event
- Retrieve event API endpoint to see which slug the recurring event now has
- Try to submit feedback about the event with this specific slug
Expected Behavior
The feedback should be submitted
Actual Behavior
A 404 error occurs: No matching event found for slug.
Additional Information
This is similar to https://github.com/digitalfabrik/integreat-cms/issues/1718, but only from the concept, the solution needs to be different.
Do we need to validate a date-part of the slug? Check that it corresponds to the event? Another option would be to simply remove the date from the slug, before we retrieve the event from DB. Does it sound okay?
Another option would be to simply remove the date from the slug, before we retrieve the event from DB. Does it sound okay?
Yes, I think removing the date string is perfectly fine, probably only relevant for edge cases to know which exact occurrence of a recurring event the feedback refers to.