Implement indexing into Apache Druid #1

Closed
m wants to merge 263 commits from druid into master
1 changed files with 13 additions and 0 deletions
Showing only changes of commit 956d328fd3 - Show all commits

View File

@ -593,3 +593,16 @@ class API(object):
if token: if token:
regproc.confirmAccount(net, num, token) regproc.confirmAccount(net, num, token)
return dumps({"success": True}) return dumps({"success": True})
@app.route("/irc/network/<net>/<num>/auth/", methods=["POST"])
@login_required
def irc_enable_auth(self, request, net, num):
if net not in main.network.keys():
return dumps({"success": False, "reason": "no such net."})
if not num.isdigit():
return dumps({"success": False, "reason": "invalid num: not a number."})
num = int(num)
if num not in main.network[net].relays.keys():
return dumps({"success": False, "reason": f"no relay {num} on {net}"})
regproc.enableAuthentication(net, num)
return dumps({"success": True})