Fix nacitani seznamu letu
This commit is contained in:
@@ -58,10 +58,12 @@ class FlightQueryResolver(BaseQueryResolver):
|
||||
if kwargs.get("point_of_interest_id"):
|
||||
query = (
|
||||
query
|
||||
.join(models.Flight.turn_points, isouter=True)
|
||||
.filter(
|
||||
or_(
|
||||
models.FlightTurnPoint.point_of_interest_id == kwargs["point_of_interest_id"],
|
||||
models.Flight.id.in_(
|
||||
select(models.FlightTurnPoint.flight_id)
|
||||
.filter(models.FlightTurnPoint.point_of_interest_id == kwargs["point_of_interest_id"])
|
||||
),
|
||||
models.Flight.id.in_(
|
||||
select(models.Photo.flight_id)
|
||||
.filter(models.Photo.point_of_interest_id == kwargs["point_of_interest_id"])
|
||||
|
||||
@@ -12,7 +12,7 @@ router = APIRouter()
|
||||
if APP_DEBUG:
|
||||
@router.get("/graphql/autologin")
|
||||
async def autologin():
|
||||
access_token = access_security.create_access_token(subject={"id": 6, "name": "Franta Vomacka"})
|
||||
access_token = access_security.create_access_token(subject={"id": 1, "name": "Franta Vomacka"})
|
||||
response = RedirectResponse(url="/graphql")
|
||||
access_security.set_access_cookie(response, access_token, expires_delta=timedelta(days=14))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user