mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-29 14:59:45 +00:00
apply review comments
This commit is contained in:
11
club/api.py
11
club/api.py
@@ -9,7 +9,6 @@ from api.auth import ApiKeyAuth
|
||||
from api.permissions import CanView, HasPerm
|
||||
from club.models import Club, Membership
|
||||
from club.schemas import (
|
||||
ClubProfileSchema,
|
||||
ClubSchema,
|
||||
ClubSearchFilterSchema,
|
||||
SimpleClubSchema,
|
||||
@@ -29,16 +28,6 @@ class ClubController(ControllerBase):
|
||||
def search_club(self, filters: Query[ClubSearchFilterSchema]):
|
||||
return filters.filter(Club.objects.order_by("name")).values()
|
||||
|
||||
@route.get(
|
||||
"/search-profile",
|
||||
response=PaginatedResponseSchema[ClubProfileSchema],
|
||||
url_name="search_club_profile",
|
||||
)
|
||||
@paginate(PageNumberPaginationExtra, page_size=50)
|
||||
def search_club_profile(self, filters: Query[ClubSearchFilterSchema]):
|
||||
"""Same as /api/club/search, but with more returned data"""
|
||||
return filters.filter(Club.objects.order_by("name"))
|
||||
|
||||
@route.get(
|
||||
"/{int:club_id}",
|
||||
response=ClubSchema,
|
||||
|
||||
Reference in New Issue
Block a user