Skip to content

Change URLs to use id instead of name#130

Open
mebesius wants to merge 7 commits into
masterfrom
Modifying-URLs-to-use-IDs-over-names
Open

Change URLs to use id instead of name#130
mebesius wants to merge 7 commits into
masterfrom
Modifying-URLs-to-use-IDs-over-names

Conversation

@mebesius
Copy link
Copy Markdown

@mebesius mebesius commented Mar 2, 2019

🎟️ Ticket(s): Closes #106


👷 Changes

  • Refactored the club endpoint to use club id rather than club name.
  • Added the select_by_club_id method while keeping the select method for now
  • Changed the clubs test file to use the id of the club rather than the name.

🚥 Concerns

Will need more refactoring on other endpoints which use club name rather than id, and also the methods which are still using the older club.select() method

🔍 Testing Instructions

Can just run the make docker-test command in terminal

Comment thread bounce/db/membership.py Outdated

def select_by_club_id(session, club_id, user_id, editors_role):
"""
Returns returns the membership for the given user of the specified club.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"Returns" accidentally repeated (line 219)

Copy link
Copy Markdown
Contributor

@JoshMarangoni JoshMarangoni left a comment

Choose a reason for hiding this comment

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

Small grammar error in comment, otherwise looks good.

DavidW7
DavidW7 previously approved these changes Mar 5, 2019
Copy link
Copy Markdown
Contributor

@DavidW7 DavidW7 left a comment

Choose a reason for hiding this comment

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

Great work!

Comment thread tests/api/endpoints/test_2_clubs.py Outdated

from bounce.server.api import util

test_post_clubs__success_club_identifier = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you can remove this line since you don't use this variable anywhere.

@bfbachmann
Copy link
Copy Markdown
Member

This looks good, but I'm going to hold off on merging it for now. We'll need to update the front-end to support this, at which point we can merge this PR.

Copy link
Copy Markdown
Contributor

@ktabouguia ktabouguia left a comment

Choose a reason for hiding this comment

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

Nice work Odin !!

This was in response to Josh's comment on the PR
In response to Bruno's comment on the PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants