fix(weather): add query params to days tag route redirect

This commit is contained in:
2026-09-28 15:28:18 +03:00
parent 80e9a80edd
commit 52315cc8bd
+4 -2
View File
@@ -3,6 +3,7 @@ from typing import Literal
from fastapi import APIRouter from fastapi import APIRouter
from fastapi.responses import HTMLResponse, RedirectResponse from fastapi.responses import HTMLResponse, RedirectResponse
from starlette.datastructures import URL
from gallery.easel.core import AppRequest from gallery.easel.core import AppRequest
from gallery.easel.depends.api import api_resolver from gallery.easel.depends.api import api_resolver
@@ -70,8 +71,9 @@ async def get_weather_days(request: AppRequest, weather_api: WeatherApiDepends,
# TODO: tag mode route deprecated, used in tizen app # TODO: tag mode route deprecated, used in tizen app
@router.get("/{provider}/{location}/tag/days-{days}", response_class=RedirectResponse) @router.get("/{provider}/{location}/tag/days-{days}", response_class=RedirectResponse)
async def get_tag_days(days: int): async def get_tag_days(request: AppRequest, days: int):
return RedirectResponse(f"../days/{days}") url = URL(path=f"../days/{days}", query=request.url.query)
return RedirectResponse(url)
# TODO: tag mode route deprecated, used in tizen app # TODO: tag mode route deprecated, used in tizen app