MCPcopy Create free account
hub / github.com/RootbeerComputer/backend-GPT / createTodo

Function createTodo

frontend/src/App.js:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 const createTodo = async e => {
32 e.preventDefault();
33 if (!todo) {
34 alert("please enter something");
35 return;
36 }
37 if (todos.some(({ task }) => task === todo)) {
38 alert(`Task: ${todo} already exists`);
39 return;
40 }
41 setCommandOutput("Command in progress");
42 setCommandOutput(await APIHelper.createTodo(todo));
43 const todoList = await APIHelper.getAllTodos();
44 setTodos([...todoList]);
45 };
46
47 const deleteTodo = async (e, id) => {
48 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected