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:
parent
b0916990fb
commit
8e6ac03f70
10 changed files with 572 additions and 23 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue