fix(billing): Remove unused client_id from agent constructors
This commit is contained in:
parent
6634ee4de0
commit
07d49321a4
6
main.py
6
main.py
|
|
@ -131,7 +131,7 @@ def auth_callback(code: str, state: str):
|
||||||
@app.get("/billing/summary")
|
@app.get("/billing/summary")
|
||||||
def billing_summary(client_id: str = ""):
|
def billing_summary(client_id: str = ""):
|
||||||
try:
|
try:
|
||||||
return BillingAgent(client_id=client_id or None).get_summary()
|
return BillingAgent().get_summary()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return JSONResponse(status_code=500, content={"error": str(exc)})
|
return JSONResponse(status_code=500, content={"error": str(exc)})
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ def billing_summary(client_id: str = ""):
|
||||||
@app.get("/billing/forecast")
|
@app.get("/billing/forecast")
|
||||||
def billing_forecast(client_id: str = ""):
|
def billing_forecast(client_id: str = ""):
|
||||||
try:
|
try:
|
||||||
return BillingAgent(client_id=client_id or None).get_forecast()
|
return BillingAgent().get_forecast()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return JSONResponse(status_code=500, content={"error": str(exc)})
|
return JSONResponse(status_code=500, content={"error": str(exc)})
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ def billing_forecast(client_id: str = ""):
|
||||||
@app.get("/billing/anomalies")
|
@app.get("/billing/anomalies")
|
||||||
def billing_anomalies(client_id: str = ""):
|
def billing_anomalies(client_id: str = ""):
|
||||||
try:
|
try:
|
||||||
return AnomalyDetector(client_id=client_id or None).detect_anomalies()
|
return AnomalyDetector().detect_anomalies()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return JSONResponse(status_code=500, content={"error": str(exc)})
|
return JSONResponse(status_code=500, content={"error": str(exc)})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user