-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Description:
Following a discussion with thibault on Discord, I am requesting an API endpoint to update or replace the entire move tree (PGN) of an existing study chapter.
Current Problem:
Currently, there is no direct way to update the moves of a chapter via API. The POST /api/study/{studyId}/{chapterId}/tags endpoint specifically ignores moves. To update a chapter's content, developers must:
DELETEthe existing chapter.POST(import) a new PGN to create a new chapter.
Why this is suboptimal:
- It changes the
chapterId, which breaks external references or local cache states. - It is an expensive "delete-and-recreate" operation for what should be a simple update.
- For synchronization tools, maintaining the same chapter structure is crucial for a smooth UX.
Proposed Solution:
An endpoint like PATCH /api/study/{studyId}/{chapterId} or a specialized POST endpoint that accepts a PGN string and replaces the existing move tree while keeping the chapterId and metadata intact.
Use Case:
I am building a synchronization tool (Chessboard.fun) that allows users to keep their local study progress in sync with Lichess. Efficiently updating moves without recreating chapters is essential for this workflow.