diff --git a/controllers/todo_alpine.js b/controllers/todo_alpine.js index deebe44..80355f0 100644 --- a/controllers/todo_alpine.js +++ b/controllers/todo_alpine.js @@ -25,8 +25,7 @@ export class Todo { await ToDo.insert({task: req.body.task}); } - // this is how you can prevent the annoying double submit - rep.code(200).send({message: "OK"}); + await this.get(req, rep); } } diff --git a/templates/todo_alpine.html b/templates/todo_alpine.html index 9a95704..ba0241e 100644 --- a/templates/todo_alpine.html +++ b/templates/todo_alpine.html @@ -6,8 +6,7 @@