Change authentication endpoint
This commit is contained in:
parent
e64aaf99d8
commit
d0ea3bb221
|
@ -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/<net>/", 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]
|
||||
|
|
Loading…
Reference in New Issue