jdockerty / jsonnet-playground

Playground for Jsonnet, inspired by Go/Rust projects of similar names.
https://jsonnet.jdocklabs.co.uk
MIT License
2 stars 0 forks source link

refactor: routes as pointer receivers for server #38

Closed jdockerty closed 5 months ago

jdockerty commented 5 months ago

Closes https://github.com/jdockerty/jsonnet-playground/issues/36

Having these routes hang off from the State didn't really make sense. They're for the HTTP server so should be one-level up, they still have access to the State because this is part of the PlaygroundServer already. Doing this removes the need of passing the State into every function, as it can be accessed internally.