Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

Commit

Permalink
feat: add endpoints for filters
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Nov 22, 2024
1 parent 6cf73ed commit 8dcdb59
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion backend/src/modules/events/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from src.api.exceptions import IncorrectCredentialsException
from src.modules.events.repository import events_repository
from src.modules.events.schemas import Filters, Pagination, Sort
from src.modules.events.schemas import DisciplineFilter, Filters, LocationFilter, Pagination, Sort
from src.storages.mongo.events import Event

router = APIRouter(
Expand Down Expand Up @@ -62,3 +62,19 @@ async def search_events(filters: Filters, sort: Sort, pagination: Pagination) ->
pages_total=1,
events=events,
)


@router.get("/search/filters/locations", responses={200: {"description": "All locations"}})
async def get_all_filters_locations() -> list[LocationFilter]:
"""
Get all locations.
"""
return []


@router.get("/search/filters/disciplines", responses={200: {"description": "All disciplines"}})
async def get_all_filters_disciplines() -> list[DisciplineFilter]:
"""
Get all disciplines.
"""
return []

0 comments on commit 8dcdb59

Please sign in to comment.