summaryrefslogtreecommitdiffstats
path: root/back
diff options
context:
space:
mode:
Diffstat (limited to 'back')
-rw-r--r--back/app.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/back/app.py b/back/app.py
index 7aa4607..9fbcb81 100644
--- a/back/app.py
+++ b/back/app.py
@@ -81,7 +81,7 @@ async def close_redis(app, loop):
await app.db.wait_closed()
-@app.post("/new-todo")
+@app.post("/api/new-todo")
async def new_todo(req):
todo = Todo.unmarshal_safe(req.json)
id = await req.app.db.incr("upnet_todo_id_seq")
@@ -90,14 +90,14 @@ async def new_todo(req):
return response_json(dict(status="ok", id=id))
-@app.post("/delete-todo")
+@app.post("/api/delete-todo")
async def delete_todo(req):
id = req.json["id"]
await req.app.db.delete(f"upnet:todo:{id}")
return response_json(dict(status="ok", was=id))
-@app.get("/todos")
+@app.get("/api/todos")
async def get_todos(req):
all_todos_keys = await req.app.db.keys("upnet:todo:*")