Skip to content

Refactor server and api to enable adding new endpoints#165

Open
bracken wants to merge 2 commits intomasterfrom
refactor_api
Open

Refactor server and api to enable adding new endpoints#165
bracken wants to merge 2 commits intomasterfrom
refactor_api

Conversation

@bracken
Copy link

@bracken bracken commented Feb 5, 2026

This refactor changes no behavior and is meant to make it easier to add the Content Type Browser.
This is separated into its own PR to keep both PRs simpler to understand.

This PR creates a src/server/ directory and moves the existing files there:

  • api.js -> src/server/api.js
  • server.js -> src/server/server.js

This also creates the file src/server/user_session.js and separates the session's language filter away from the session for the content. This is to enable the Type Browser to easily use the translation helper.

Bracken Mosbacker added 2 commits January 13, 2026 14:07
In order to use the language in other files than the
api.json it needs to be separate
Adding a bit of organization to make it easier
to add more pages and apis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant