### 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?

![2024-09-18_00-39](https://github.com/user-attachments/assets/54255672-ea65-417f-887a-72be29f7097d)


-- 
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/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to