1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed some DB API endpoints

This commit is contained in:
Krateng 2019-10-03 05:24:47 +02:00
parent 243362d7d6
commit 96d1b8d77b

View File

@ -701,8 +701,7 @@ def abouttoshutdown():
#sys.exit()
@dbserver.post("newrule")
def newrule():
keys = FormsDict.decode(request.forms)
def newrule(**keys):
apikey = keys.pop("key",None)
if (checkAPIkey(apikey)):
tsv.add_entry("rules/webmade.tsv",[k for k in keys])
@ -808,8 +807,7 @@ def issues():
@dbserver.post("importrules")
def import_rulemodule():
keys = FormsDict.decode(request.forms)
def import_rulemodule(**keys):
apikey = keys.pop("key",None)
if (checkAPIkey(apikey)):
@ -828,9 +826,7 @@ def import_rulemodule():
@dbserver.post("rebuild")
def rebuild():
keys = FormsDict.decode(request.forms)
def rebuild(**keys):
apikey = keys.pop("key",None)
if (checkAPIkey(apikey)):
log("Database rebuild initiated!")