While we have a working feedback implementation right now, we should refactor it to be more consistent with the codebase, scalable, and more aligned with how frontend might use it.
As such, we need four routes:
Users posting feedback:
POST /feedback
Admins being able to see all feedback associated with an event (restricted route):
GET /event/uuid/feedback
Get user feedback for event uuid, regardless of role:
GET /feedback/event/uuid
Acknowledge/ignore feedback:
PATCH /feedback/uuid
The current implementations of the POST and PATCH routes shouldn't need to be changed. However, we should get rid of the query parameters structure and go with more straightforward queries.
While we have a working feedback implementation right now, we should refactor it to be more consistent with the codebase, scalable, and more aligned with how frontend might use it.
As such, we need four routes:
Users posting feedback:
POST /feedback
Admins being able to see all feedback associated with an event (restricted route):
GET /event/uuid/feedback
Get user feedback for event uuid, regardless of role:
GET /feedback/event/uuid
Acknowledge/ignore feedback:
PATCH /feedback/uuid
The current implementations of the POST and PATCH routes shouldn't need to be changed. However, we should get rid of the query parameters structure and go with more straightforward queries.
Here's a quick diagram that might clarify things: