From d0ea3bb221081b9e5cd976b1c7cde861e6cd979b Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 18 Aug 2022 07:20:30 +0100 Subject: [PATCH] Change authentication endpoint --- api/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 59d12d0..5b409ab 100644 --- a/api/views.py +++ b/api/views.py @@ -194,7 +194,7 @@ class API(object): } return dumps(networks) - @app.route("/irc/network/auth/", methods=["POST"]) + @app.route("/irc/auth/", methods=["POST"]) @login_required def irc_network_recheckauth(self, request): try: @@ -214,6 +214,7 @@ class API(object): if net not in main.network.keys(): return dumps({"success": False, "reason": "no such net."}) nets = [net] + print("NETS", nets) for net_name in nets: conns = helpers.get_connected_relays(net_name) if not conns: @@ -227,12 +228,14 @@ class API(object): conn.regPing(reset=True) elif func == "register": for conn in conns: + print("REGISTER ACCOUNT", conn.net, conn.num) regproc.registerAccount(conn.net, conn.num) return dumps({"success": True}) @app.route("/irc/network//", methods=["POST"]) @login_required def irc_network(self, request, net): + print("IRC_NETWORK") if net not in main.network.keys(): return dumps({"success": False, "reason": "no such net."}) inst = main.network[net]