MCPcopy Create free account
hub / github.com/astercloud/aster / updateTodoStatus

Function updateTodoStatus

ui/src/stores/todos.ts:180–194  ·  view source on GitHub ↗
(todoId: string, status: "pending" | "in_progress" | "completed")

Source from the content-addressed store, hash-verified

178 * 更新 Todo 状态 (发送到后端)
179 */
180 const updateTodoStatus = async (todoId: string, status: "pending" | "in_progress" | "completed") => {
181 const { getInstance } = useWebSocket();
182 const ws = getInstance();
183 if (ws) {
184 ws.send({
185 type: "todo_update",
186 payload: {
187 id: todoId,
188 status,
189 },
190 });
191 } else {
192 console.error("WebSocket not connected, cannot update todo");
193 }
194 };
195
196 /**
197 * 删除 Todo (发送到后端)

Callers

nothing calls this directly

Calls 3

useWebSocketFunction · 0.90
getInstanceFunction · 0.85
sendMethod · 0.45

Tested by

no test coverage detected