Implement indexing into Apache Druid #1
12
api/views.py
12
api/views.py
|
@ -617,7 +617,7 @@ class API(object):
|
||||||
nick = None
|
nick = None
|
||||||
if channel == main.IRCPool[name].nickname:
|
if channel == main.IRCPool[name].nickname:
|
||||||
in_query = True
|
in_query = True
|
||||||
if nick:
|
if not nick:
|
||||||
return dumps({"success": False, "reason": "no nick specified to query"})
|
return dumps({"success": False, "reason": "no nick specified to query"})
|
||||||
else:
|
else:
|
||||||
main.IRCPool[name].sendmsg(nick, msg, in_query=in_query)
|
main.IRCPool[name].sendmsg(nick, msg, in_query=in_query)
|
||||||
|
@ -687,3 +687,13 @@ class API(object):
|
||||||
return dumps({"success": False, "reason": f"no relay {num} on {net}"})
|
return dumps({"success": False, "reason": f"no relay {num} on {net}"})
|
||||||
regproc.enableAuthentication(net, num, jump=False, run_now=True)
|
regproc.enableAuthentication(net, num, jump=False, run_now=True)
|
||||||
return dumps({"success": True})
|
return dumps({"success": True})
|
||||||
|
|
||||||
|
@app.route("/irc/sinst/<net>/", methods=["GET"])
|
||||||
|
@login_required
|
||||||
|
def irc_get_authentity(self, request, net):
|
||||||
|
if net not in main.network.keys():
|
||||||
|
return dumps({"success": False, "reason": "no such net."})
|
||||||
|
auth = regproc.selectInst(net)
|
||||||
|
if not auth:
|
||||||
|
return dumps({"success": False, "reason": "error getting results."})
|
||||||
|
return dumps({"success": True, "sinst": auth})
|
||||||
|
|
Loading…
Reference in New Issue