Split the Dashboard from All Tasks. (#10)

Reviewed-on: #10
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-09-24 01:02:23 +00:00 committed by Drew
parent b0916990fb
commit 8e6ac03f70
10 changed files with 572 additions and 23 deletions

View file

@ -1,5 +1,6 @@
import type {
Task,
TaskStatus,
CreateTaskRequest,
UpdateTaskRequest,
ApiError,
@ -81,8 +82,9 @@ class ApiClient {
}
}
async listTasks(): Promise<Task[]> {
return this.fetchWrapper<Task[]>('/tasks')
async listTasks(status?: TaskStatus): Promise<Task[]> {
const url = status ? `/tasks?status=${status}` : '/tasks'
return this.fetchWrapper<Task[]>(url)
}
async getTask(id: string): Promise<Task> {