aleph icon indicating copy to clipboard operation
aleph copied to clipboard

Flask defaults, some reduced coupling & cleaning up

Open monneyboi opened this issue 2 years ago • 4 comments

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:

  • require was dropped in favor of abort
  • Some HTTP 403 codes were changed to HTTP 401 where that made sense.
  • jsonify and related calls were dropped in favor of a JSONProvider
  • 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.

monneyboi avatar Aug 29 '23 14:08 monneyboi

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 ?

stchris avatar Aug 31 '23 12:08 stchris

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 avatar Aug 31 '23 13:08 monneyboi

@monneyboi If you'd be willing to slit this up it'll making merging and releasing it a lot faster/easier

Rosencrantz avatar Sep 11 '23 08:09 Rosencrantz

ping @monneyboi

Rosencrantz avatar Sep 28 '23 09:09 Rosencrantz