mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 14:16:16 -08:00
fix(server-storage): refuse user state for deleted playlists
PUT /v1/user-state/:namespace/:playlistId answers 404 playlist_missing when the server has no such playlist, so an edit queued on another device (including its conflict replay with If-None-Match: *) cannot recreate the state of a playlist deleted meanwhile. The client drops such an edit and its cache entry instead of retrying; page-hide writes report it as gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
716580cb16
commit
f956758cce
8 files changed
+114
-8
No files matched your search
@@ -133,7 +133,7 @@ All JSON. Errors: `{ message, status, code? }`.
|
||||
| `DELETE /v1/playlists` | Delete all playlists and all user state. |
|
||||
| `GET/PUT /v1/app-state/:key` | `{ value }`. |
|
||||
| `GET /v1/user-state` | `{ entries: { [namespace]: { [playlistId]: value } }, tags }`, a content tag per entry. |
|
||||
| `PUT/DELETE /v1/user-state/:namespace/:playlistId` | One entry. Namespaces are an allow-list. `If-Match: "<tag>"` or `If-None-Match: *` makes it conditional: `412` with the current value and tag. |
|
||||
| `PUT/DELETE /v1/user-state/:namespace/:playlistId` | One entry. Namespaces are an allow-list. `If-Match: "<tag>"` or `If-None-Match: *` makes it conditional: `412` with the current value and tag. A `PUT` for a playlist the server does not have answers `404 playlist_missing`. |
|
||||
|
||||
ETags are `"<bootId>-<revision>"` from an in-memory per-playlist revision
|
||||
counter; the server is the only writer of its database.
|
||||
|
||||
Reference in new issue
Block a user