Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: implement json api layer #5

Open
sripwoud opened this issue Dec 15, 2024 · 0 comments
Open

server: implement json api layer #5

sripwoud opened this issue Dec 15, 2024 · 0 comments

Comments

@sripwoud
Copy link
Member

sripwoud commented Dec 15, 2024

Originally in pseXperiments#5

Instead of serving directly pre generated html documents, we want to serve the DB data as json and let the client web app build the pages.

Probably not too complicated as the handlers logic are already implemented.
We need to duplicate the handlers (add new endpoints to e.g /api/v1/*) and return json instead of rinja templates. E.g here, use of rinja::into_response.

keeping the existing html endpoints and adding new json endpoints (e.g inn and /api/v1/inn) will allow for a smoother transition to the new front end.

The existing API seems to be documented as comments/docstrings already in each handler file.

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

No branches or pull requests

1 participant