Cleanup/api pass - #173
Merged
Merged
Conversation
JefeThePug
reviewed
Aug 23, 2026
JefeThePug
reviewed
Aug 23, 2026
JefeThePug
reviewed
Aug 23, 2026
JefeThePug
reviewed
Aug 23, 2026
JefeThePug
reviewed
Aug 23, 2026
JefeThePug
approved these changes
Aug 23, 2026
JefeThePug
left a comment
Collaborator
There was a problem hiding this comment.
Looks great. I've added a few comments here and there. Also some of the docker stuff is a bit over my head so I skipped it, but the python is good :)
Xarlos89
added a commit
that referenced
this pull request
Aug 23, 2026
* add `/link_to` slash command * ran pre-commit post commit * Fix type annotation of WEBPAGE_CHOICES * Change WEBPAGE_CHOICES from list to tuple * Remove unnecessary constant * Cleanup/api pass (#173) * clean up the API <-> db helper * API modifications and improvements * update dockerfile entrypoint * Update logging cogs * Update moderation cogs * Update verification cogs * Update admin cogs * Update feature cogs * tests! * update postman collection * fixing tests so they work! * fix pre-commit * exclude tests from pre-commit in CI + .env.EXAMPLE updates * Update actions/setup-python action to v7 (#171) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * add `/link_to` slash command * ran pre-commit post commit * Fix type annotation of WEBPAGE_CHOICES * Change WEBPAGE_CHOICES from list to tuple * Remove unnecessary constant * remove newline for ruff check --------- Co-authored-by: Krish <101330162+Jiggly-Balls@users.noreply.github.com> Co-authored-by: Xarlos <57622136+Xarlos89@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full cleanup pass over the Flask API.
The API now uses a connection pool instead of a single psycopg connection, every route returns a correct HTTP status code, and the responses are consistent across all endpoints. Every cog was updated to the new response, and a pytest suite covering the routes was added and slammed into CI.
Fixes the long-standing jsonify(data, status_code) bug — that call serialised the status code into the body as a JSON array and always returned HTTP 200, which is why cogs were indexing responses as
result[0]["logging"][2].Closes #134