Fix: Ensure all skills are tracked as files, not submodules

This commit is contained in:
sck_0
2026-01-14 18:48:48 +01:00
parent 7f46ed8ca1
commit 8bd204708b
1113 changed files with 82065 additions and 2 deletions

View File

@@ -0,0 +1,57 @@
const API_BASE = '/api';
export interface Todo {
id: number;
title: string;
completed: boolean;
createdAt: string;
}
export interface CreateTodoRequest {
title: string;
}
export const fetchTodos = async (): Promise<Todo[]> => {
const response = await fetch(`${API_BASE}/todos`);
if (!response.ok) {
throw new Error('Failed to fetch todos');
}
return response.json();
};
export const createTodo = async (title: string): Promise<Todo> => {
const response = await fetch(`${API_BASE}/todos`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ title }),
});
if (!response.ok) {
throw new Error('Failed to create todo');
}
return response.json();
};
export const updateTodo = async (id: number, completed: boolean): Promise<Todo> => {
const response = await fetch(`${API_BASE}/todos/${id}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ completed }),
});
if (!response.ok) {
throw new Error('Failed to update todo');
}
return response.json();
};
export const deleteTodo = async (id: number): Promise<void> => {
const response = await fetch(`${API_BASE}/todos/${id}`, {
method: 'DELETE',
});
if (!response.ok) {
throw new Error('Failed to delete todo');
}
};