You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PUT /api/v1/events creates a new event on every call, so a retried request duplicates it #268
PUT /api/v1/events (server/app/api/edit.py:409, event_put) inserts a new DayEvent on every call and answers 201. Its docstring says why: events have no natural key — two «Обед» rows on one day are two breaks — so it always creates.
The reason is real; the method is wrong for it. PUT is idempotent by definition, so a client, a proxy or a retrying HTTP library may resend it after a timeout, and every resend here is a second event, a second audit line and a second announcement in the class chat.
Failure scenario. An editor's phone sends PUT /api/v1/events with «Экскурсия», 14:00–16:00; the response is lost to a dropped connection after the commit; OkHttp (or the user) retries. The class now has two identical «Экскурсия» events, the journal records two additions, and every member gets «📅 Событие: Экскурсия» twice.
No current APK calls this route (found by the API survey of 3 October 2026), so nobody has hit it yet.
Where it goes. The v2 contract makes creation a POST on class/events (docs/specs/2026-10-03-one-contract-design.md, the resource map), so a retry can be told apart; v1, and this route with it, is then removed.
Activity
Say where the work stands after the one-contract programme was agreed…
Take main now that #277 has merged, and give milestone 11's row what …
Write the day-to-day writes into the contract: homework, substitution…