[openstreetmap/openstreetmap-website] `/messages/{id}/mark?mark={unread/read}` returns HTML code (Issue #5222)
Dimitar
notifications at github.com
Wed Sep 18 17:04:14 UTC 2024
### URL
https://www.openstreetmap.org/messages/inbox
### How to reproduce the issue?
0. Have at least 1 message in the inbox
1. Mark it as read/unread
2. Notice that two requests are made at the same time (one POST and one GET).
The POST request goes to `https://www.openstreetmap.org/messages/{id}/mark?mark=unread`, while the GET request goes to `https://www.openstreetmap.org/messages/inbox`. Both requests return the same HTML code, which seems a bit wasteful on server resources if both are generated independently.
The most logical solution would be to change the response body of the POST request to have some short status code/text instead of the whole page HTML (assuming that won't break the turbo integration).
### Screenshot(s) or anything else?

--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5222
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/5222 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240918/d58b5c19/attachment.htm>
More information about the rails-dev
mailing list