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

Use resourceful routes for terms view/accept/decline #5462

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

AntonKhorev
Copy link
Collaborator

  • make user terms a nested resource inside the account resource
  • GET /user/terms changed to GET /account/terms. It's inconvenient to have it at /user/terms because that depends on the declaration order. If user resources are declared first, they capture terms as a username. I still add a redirect from /user/terms to /account/terms which has to come before resources :users, but with redirects it's obvious that they are temporary.
  • POST /user/save changed to PUT /account/terms. With user#save it's not clear that this is a target of the terms form.

Copy link
Collaborator

@gravitystorm gravitystorm left a comment

Choose a reason for hiding this comment

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

Looks good to me, one small change in the tests.

I also appreciate the tests are slightly refactored, and this is an improvement.

test/integration/user_terms_seen_test.rb Outdated Show resolved Hide resolved
@gravitystorm gravitystorm merged commit fa51bcb into openstreetmap:master Jan 8, 2025
21 checks passed
@gravitystorm
Copy link
Collaborator

Merged, thanks!

@AntonKhorev AntonKhorev deleted the user-terms-resource branch January 8, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants