(20250225) Started accepting more fields to the verification API.
This commit is contained in:
@@ -363,6 +363,24 @@ class MikroTikHotspot1000Controller(MikroTikController):
|
||||
all_messages.append(f"STEP 8 ({api_response.action}): {api_response.success}")
|
||||
if not api_response.success: all_success = False
|
||||
|
||||
# STEP 9-A
|
||||
# Set up the Walled-Garden:
|
||||
for index, url in enumerate([
|
||||
"api.thecaoffice.com",
|
||||
"cdn.jsdelivr.net"
|
||||
]):
|
||||
api_response = await mikrotik_client.add_hotspot_walled_garden(
|
||||
json_payload={
|
||||
"action": "allow",
|
||||
"dst-host": url,
|
||||
"comment": HS_COMMENT
|
||||
}
|
||||
)
|
||||
print(f"STEP 9-A.{index}:", api_response.success, f"({api_response.action})")
|
||||
print("MESSAGE:", api_response.message)
|
||||
print("JSON:", api_response.data)
|
||||
print("\n\n")
|
||||
|
||||
# STEP 9:
|
||||
# Set up the Walled-Garden IP:
|
||||
api_response = await mikrotik_client.add_hotspot_walled_garden_ip(
|
||||
|
||||
Reference in New Issue
Block a user