fix(server): specify request: Request type annotation for FastAPI sync endpoint

This commit is contained in:
2026-09-24 17:36:56 +02:00
parent b1327a4336
commit 032a5a61b4
+3 -3
View File
@@ -936,16 +936,16 @@ async def import_signed_license(req: Request):
@app.post("/api/license/renew") @app.post("/api/license/renew")
@app.post("/api/license/sync") @app.post("/api/license/sync")
async def trigger_license_renewal(req: Optional[Request] = None): async def trigger_license_renewal(request: Request):
""" """
Explicitly triggers automated mTLS sync and renewal with logar.eibl.tech. Explicitly triggers automated mTLS sync and renewal with logar.eibl.tech.
Supports picking up seat quota increases and certificate extensions in-flight. Supports picking up seat quota increases and certificate extensions in-flight.
""" """
requested_seats = None requested_seats = None
seat_increment = 0 seat_increment = 0
if req:
try: try:
body = await req.json() body = await request.json()
if isinstance(body, dict):
requested_seats = body.get("requested_seats") requested_seats = body.get("requested_seats")
seat_increment = int(body.get("seat_increment", 0)) seat_increment = int(body.get("seat_increment", 0))
except Exception: except Exception: