Create CRUD endpoints for pages/groups #14582
Labels
added-to-sprint
kind/chore
status/draft
Status: When you create an issue before you have enough info to properly describe the issue.
team/studio-domain2
Description
Instead of sending multiple requests and also sending the whole (and potentially outdated)
Settings.json
file upon doing changes to pages, we should have backend endpoints for just those specific actions.Additional Information
This lets the backend do the heavy lifting and avoids issues, for example from multiple requests being sent quickly (like this issue https://digdir.slack.com/archives/C077KTTCBSS/p1738755536603919) or one of the requests failing, leaving the app in a broken state.
Testing
Deploy the top branch of the PR stack (currently #14717) and test:
Tasks
example of needed endpoint routes:
POST
/layout/pages/create
DELETE
/layout/{layoutname}/page/{pageid}
PUT
/layout/{layoutname}/page/{pageId}
GETnot needed? how do we avoid stale caches being mutated without this, optimistic cache updates?Also implement these as tanstack mutations, and change the frontend logic to use these (and invalidate layout caches?)
Acceptance Criterias
No response
The text was updated successfully, but these errors were encountered: