Add mock options in frontend and removed from environment variables

This commit is contained in:
Ettore
2026-05-08 20:16:04 +02:00
parent bd5403b2d3
commit d803e2d7f6
10 changed files with 67 additions and 12 deletions

View File

@@ -88,11 +88,13 @@ async def admin_open_gate(
ip = request.headers.get("X-Forwarded-For", request.client.host if request.client else None)
ua = request.headers.get("User-Agent")
mock = bool(cred_db.mock_avconnect)
success, error_msg, new_sid = call_open_gate(
gate_db.avconnect_macro_id,
cred_db.username,
decrypt_secret(cred_db.password_enc),
cred_db.session_id,
mock=mock,
)
db.add(GateAccessLog(
@@ -154,11 +156,13 @@ async def open_gate(
if allowed is not None and gate_id not in allowed:
raise HTTPException(403, "This keypass does not have access to this gate")
mock = bool(cred_db.mock_avconnect)
success, error_msg, new_sid = call_open_gate(
gate_db.avconnect_macro_id,
cred_db.username,
decrypt_secret(cred_db.password_enc),
cred_db.session_id,
mock=mock,
)
db.add(GateAccessLog(