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

Change routes to only use the required resource #64

Merged
merged 4 commits into from Mar 9, 2020

Conversation

pckv
Copy link
Owner

@pckv pckv commented Mar 9, 2020

The previous routing system got unnecessarily complex, with actions on comments requiring references for 3 items: /resubs/{resub}/posts/{post}/comments/{comment}/vote/{vote}. The comment id is unique, and as such the references to resub and post are useless here.

This PR removes the unused references, and by doing so, the specific route files only need resolvers for their respective resource. E.g /resubs/{resub}/posts was moved from routes/posts.py to routes/resubs.py.

@pckv pckv added the enhancement New feature or request label Mar 9, 2020
@pckv pckv requested a review from EspenK March 9, 2020 13:15
@pckv pckv self-assigned this Mar 9, 2020
@pckv pckv added this to Awaiting review in Repost FastAPI via automation Mar 9, 2020
# Conflicts:
#	repost/api/resolvers.py
#	repost/api/routes/comments.py
#	repost/api/routes/posts.py
Copy link
Collaborator

@EspenK EspenK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good change, but you need to fix the merge conflicts.

@pckv
Copy link
Owner Author

pckv commented Mar 9, 2020

Looks like a good change, but you need to fix the merge conflicts.

👎 🐍 :

@pckv pckv requested a review from EspenK March 9, 2020 14:35
@EspenK EspenK merged commit 8304afd into master Mar 9, 2020
Repost FastAPI automation moved this from Awaiting review to Done Mar 9, 2020
@EspenK EspenK deleted the single-resource-routes branch March 9, 2020 14:36
pckv added a commit to pckv/repost-apitest that referenced this pull request Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants