Add mock options in frontend and removed from environment variables
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user