Spaces:
Build error
Build error
David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120 | import axios from 'axios'; | |
| import { Todo } from './App'; | |
| const api = axios.create({ | |
| baseURL: '/api', | |
| }); | |
| export const fetchTodos = async (): Promise<Todo[]> => { | |
| const response = await api.get<Todo[]>('/todos/'); | |
| return response.data; | |
| }; | |
| export const createTodo = async (todo: Omit<Todo, 'id'>): Promise<Todo> => { | |
| const response = await api.post<Todo>('/todos/', todo); | |
| return response.data; | |
| }; | |
| export const updateTodo = async (id: number, todo: Omit<Todo, 'id'>): Promise<Todo> => { | |
| const response = await api.put<Todo>(`/todos/${id}`, todo); | |
| return response.data; | |
| }; | |
| export const deleteTodo = async (id: number): Promise<void> => { | |
| await api.delete(`/todos/${id}`); | |
| }; | |