mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-04-19 08:55:15 +00:00
Gesamtlast does not work anymore. Wrong FastAPI Header. Swagger also wrong
This commit is contained in:
parent
9ccc9d930f
commit
a00f9593ce
@ -13,7 +13,7 @@ from fastapi.exceptions import HTTPException
|
|||||||
matplotlib.use("Agg")
|
matplotlib.use("Agg")
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from fastapi import FastAPI, Query
|
from fastapi import FastAPI, Query, Body
|
||||||
from fastapi.responses import FileResponse, RedirectResponse
|
from fastapi.responses import FileResponse, RedirectResponse
|
||||||
|
|
||||||
from akkudoktoreos.config import (
|
from akkudoktoreos.config import (
|
||||||
@ -72,9 +72,9 @@ def fastapi_strompreis() -> list[float]:
|
|||||||
|
|
||||||
@app.post("/gesamtlast")
|
@app.post("/gesamtlast")
|
||||||
def fastapi_gesamtlast(
|
def fastapi_gesamtlast(
|
||||||
year_energy: float,
|
year_energy: float = Body(..., embed=True),
|
||||||
measured_data: list[dict[str, Any]],
|
measured_data: list[dict[str, Any]] = Body(...),
|
||||||
hours: int = config.eos.prediction_hours,
|
hours: int = Body(..., embed=True),
|
||||||
) -> list[float]:
|
) -> list[float]:
|
||||||
"""Endpoint to handle total load calculation based on the latest measured data."""
|
"""Endpoint to handle total load calculation based on the latest measured data."""
|
||||||
# Measured data in JSON format
|
# Measured data in JSON format
|
||||||
|
Loading…
x
Reference in New Issue
Block a user