mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-13 15:15:03 +00:00
apply review comments
This commit is contained in:
@@ -55,7 +55,8 @@ class UserClubController(ControllerBase):
|
|||||||
permissions=[CanView],
|
permissions=[CanView],
|
||||||
url_name="fetch_user_clubs",
|
url_name="fetch_user_clubs",
|
||||||
)
|
)
|
||||||
def search_club(self, user_id: int):
|
def fetch_user_clubs(self, user_id: int):
|
||||||
|
"""Get all the active memberships of the given user."""
|
||||||
user = self.get_object_or_exception(User, id=user_id)
|
user = self.get_object_or_exception(User, id=user_id)
|
||||||
return (
|
return (
|
||||||
Membership.objects.ongoing()
|
Membership.objects.ongoing()
|
||||||
|
|||||||
Reference in New Issue
Block a user