fix(server): specify request: Request type annotation for FastAPI sync endpoint
This commit is contained in:
+6
-6
@@ -936,20 +936,20 @@ async def import_signed_license(req: Request):
|
||||
|
||||
@app.post("/api/license/renew")
|
||||
@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.
|
||||
Supports picking up seat quota increases and certificate extensions in-flight.
|
||||
"""
|
||||
requested_seats = None
|
||||
seat_increment = 0
|
||||
if req:
|
||||
try:
|
||||
body = await req.json()
|
||||
try:
|
||||
body = await request.json()
|
||||
if isinstance(body, dict):
|
||||
requested_seats = body.get("requested_seats")
|
||||
seat_increment = int(body.get("seat_increment", 0))
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
config = SERVER_STATE.get("config", {})
|
||||
cert_dir = config.get("cert_dir", "certs")
|
||||
|
||||
Reference in New Issue
Block a user