feat: 오늘 날씨 위젯 표시 및 주간 날씨 예보 팝업 다이얼로그 추가
Build and Deploy / deploy (push) Failing after 14s

This commit is contained in:
simva committed 2026-10-23 13:39:28 +09:00
1 parent 42008079db
commit c86ec6a84f
10 files changed
+660 -47

No files matched your search

+21
View File
@@ -21,6 +21,7 @@ from .files import (
create_folder_zip,
create_batch_zip
)
from .weather import get_weather_forecast
app = FastAPI(title="Transmission Magnet Manager API", version="1.0.0")
@@ -62,6 +63,26 @@ async def check_status():
}
)
@app.get("/api/weather", response_model=ApiResponse)
async def get_weather(
lat: float = Query(default=37.5665, description="위도"),
lon: float = Query(default=126.9780, description="경도")
):
"""현재 날씨 및 7일간 주간 날씨 예보 조회"""
try:
data = await get_weather_forecast(lat=lat, lon=lon)
return ApiResponse(
success=True,
message="날씨 정보를 성공적으로 가져왔습니다.",
data=data
)
except Exception as e:
return ApiResponse(
success=False,
message=f"날씨 정보를 가져오는 데 실패했습니다: {str(e)}",
data=None
)
@app.post("/api/torrents/add", response_model=ApiResponse)
async def add_magnet(req: AddMagnetRequest):
"""마그넷 또는 토렌트 URL 추가"""