@ -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);
@ -6,8 +6,7 @@
<script>
const new_task = async (todos, task) => {
// zero error handling but fine for now
await axios.post("/todo_alpine", {task});
return (await axios.get('/todo_alpine')).data;
return (await axios.post("/todo_alpine", {task})).data;
</script>