aleph
aleph copied to clipboard
Flask defaults, some reduced coupling & cleaning up
This PR refactors some of the view logic to more closely follow the flask documentation / defaults.
It looks like a lot, but not much is going on:
requirewas dropped in favor ofabort- Some HTTP 403 codes were changed to HTTP 401 where that made sense.
jsonifyand related calls were dropped in favor of aJSONProvider- A test was added for JSONP functionality
- Code was localized from general utils to local files where possible
- Unused code was removed
This was done with the intention of reducing coupling, side-effects, and making the code more understandable for newcomers.
I started reviewing this but I find it really hard with all the things going on. I will need some more time. Perhaps we can focus on potentially just doing one thing per PR in the future, @monneyboi ?
Perhaps we can focus on potentially just doing one thing per PR in the future, @monneyboi ?
Yes sorry, i can imagine. I can also split this one up if that helps?
@monneyboi If you'd be willing to slit this up it'll making merging and releasing it a lot faster/easier
ping @monneyboi