(20250218) mkj

This commit is contained in:
2025-02-18 15:17:45 +05:30
parent b7823f4c48
commit 5074b3f040
5 changed files with 551 additions and 1400 deletions
+10 -1
View File
@@ -224,7 +224,16 @@ async def authorize_software_client(
elif inbound_data.softwareClient == "mikrotikHotspot1000":
pass
# Make the client controller test and save the auth:
response = await current_app.mikrotik_hotspot_1000_controller.save_auth(
sql_conn = current_app.sql_writer,
mongo_data_conn = current_app.data_mongo,
mikrotik_auth = inbound_data.auth
)
# Note down the results:
success = response.success
message = f"Action Chain '{response.actionChain}': {response.message}"
# ┳┓
# ┣┫┏┓┏┏┓┏┓┏┓┏┏┓
+7
View File
@@ -100,6 +100,7 @@ from controllers_v2.finstitutions.payments.safaricom_mpesa_express import Safari
# ---
from controllers_v2.software.mikrotik.all_mikrotik import AllMikroTikController
from controllers_v2.software.mikrotik.mikrotik_pppoe_1000 import MikroTikPPPoE1000Controller
from controllers_v2.software.mikrotik.mikrotik_hostpot_1000 import MikroTikHotspot1000Controller
# To make REST API calls:
import httpx
@@ -573,6 +574,12 @@ async def app_startup(**kwargs):
alert_url = current_app.script_data["alerts"]["url"],
debug = enable_debugging
)
current_app.mikrotik_hotspot_1000_controller = MikroTikHotspot1000Controller(
cache = current_app.module_cache,
http_client = current_app.http_client,
alert_url = current_app.script_data["alerts"]["url"],
debug = enable_debugging
)
current_app.printer("Software/MikroTik (C) ready.")
# ┏┓ ┓ ┏┓┓•