FIX get/post
This commit is contained in:
parent
c36a1ea0cc
commit
d929839025
1 changed files with 4 additions and 4 deletions
|
@ -68,7 +68,7 @@ def help():
|
|||
)
|
||||
|
||||
|
||||
@app.get("/api/create")
|
||||
@app.post("/api/create")
|
||||
def create():
|
||||
req = dict(request.POST.decode().allitems())
|
||||
ret = {}
|
||||
|
@ -87,7 +87,7 @@ def create():
|
|||
)
|
||||
|
||||
|
||||
@app.get("/api/delete")
|
||||
@app.post("/api/delete")
|
||||
def delete():
|
||||
req = dict(request.POST.decode().allitems())
|
||||
logging.info("Server: request delete %s " % (req))
|
||||
|
@ -100,7 +100,7 @@ def delete():
|
|||
return self.rec_err("DELETE error: %s" % (db.get_err()))
|
||||
|
||||
|
||||
@app.get("/api/update/{recid}")
|
||||
@app.post("/api/update/{recid}")
|
||||
def update(recid: int):
|
||||
req = dict(request.POST.decode().allitems())
|
||||
|
||||
|
@ -126,7 +126,7 @@ def update(recid: int):
|
|||
return self.rec_msg("Aggiornamento completato!", rec=rec_sanitize(result_rec))
|
||||
|
||||
|
||||
@app.get("/api/generate")
|
||||
@app.post("/api/generate")
|
||||
def generate():
|
||||
# prendiamo la rec in causa
|
||||
recid = dict(request.POST.decode().allitems())["id"]
|
||||
|
|
Loading…
Reference in a new issue