Restaurant

Router and logic for the restaurant of the Website

Functions:

findrestaurant(request, rating, costs, ...)

Requests user settings and search for restaurant.

async views.restaurant.findrestaurant(request: starlette.requests.Request, rating: int, costs: float, radius: int, lat: str, lng: str, manuell_location: str, cuisine: Optional[str] = None, allergies: Optional[str] = None, db_session: sqlalchemy.orm.session.Session = Depends(get_db), current_user: schemes.scheme_user.User = Depends(get_current_user))[source]

Requests user settings and search for restaurant.

Parameters
  • request (Request) – the http request

  • rating (int) – the minimal rating

  • costs (float) – the minimal costs

  • radius (int) – the radius

  • lat (str) – the latitude

  • lng (str) – the longitude

  • manuell_location (str) – manuell location for the search

  • cuisine (Union[str, None], optional) – the selected cuisines. Defaults to None.

  • allergies (Union[str, None], optional) – the selected allergies. Defaults to None.

  • db_session (Session, optional) – the db session. Defaults to Depends(get_db).

  • current_user (User, optional) – the current user. Defaults to Depends(get_current_user).

Returns

redirect to /error… TemplateResponse: the http response

Return type

RedirectResponse