Actions
Bug #94
openInvalid type value in /api/event/like causes like button to disappear (Web-api)
Status:
New
Priority:
Normal
Assignee:
-
Description
The API accepts invalid values for the type field in the request body. When an invalid value (e.g., "InvalidValue") is sent, the request is still processed instead of being rejected. This results in inconsistent frontend behavior where the like button disappears from the post.
Steps to Reproduce:
- Send a POST request to /api/event/like
- Use a valid _id but an invalid type value:
{
"_id": "69e76a97ec95b608604e97f9",
"type": "InvalidValue"
}
- Observe the frontend after the request
Expected Behavior:
API should validate the type field
Invalid values should return an error (e.g., 400 Bad Request)
UI should remain unaffected by invalid input
Actual Behavior:
API accepts invalid type
Like state becomes inconsistent
Like button disappears from the post in UI
Files
Actions