Skip to content

Commit

Permalink
[2023-05-15 08:22] Fixed an issue with the multi-location version of …
Browse files Browse the repository at this point in the history
…the get_weather router method. (#102) (#103)

Signed-off-by: Raoul Linnenbank <58594297+rflinnenbank@users.noreply.github.com>
  • Loading branch information
rflinnenbank authored May 15, 2023
1 parent 25091b2 commit 5e8b2d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions weather_provider_api/routers/weather/api_view_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,15 @@ async def get_alarm(): # pragma: no cover

# Handler for requests with multiple locations:
@app.get("/sources/{source_id}/models/{model_id}/multiple-locations/", tags=["sync"])
@API_RATE_LIMITER.limit("5/minute")
async def get_sync_weather_multi_loc(
source_id: str,
model_id: str,
cleanup_tasks: BackgroundTasks,
ret_args: WeatherContentRequestMultiLocationQuery = Depends(),
fmt_args: WeatherFormattingRequestQuery = Depends(),
accept: str = Depends(header_accept_type),
request: Request,
source_id: str,
model_id: str,
cleanup_tasks: BackgroundTasks,
ret_args: WeatherContentRequestMultiLocationQuery = Depends(),
fmt_args: WeatherFormattingRequestQuery = Depends(),
accept: str = Depends(header_accept_type),
): # pragma: no cover
starting_time = datetime.utcnow()
logger.info(f"WeatherRequest({starting_time}): {request.url}", datetime=datetime.utcnow())
Expand Down

0 comments on commit 5e8b2d7

Please sign in to comment.