Skip to content

Commit ca4115e

Browse files
committed
feat: add API methods to retrieve active and completed tasks
1 parent a40474a commit ca4115e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

client/services/api.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,20 @@ export const tasksApi = {
227227
} catch (error) { throw handleApiError(error); }
228228
},
229229

230+
getActive: async (): Promise<Task[]> => {
231+
try {
232+
const res = await api.get("/tasks/active");
233+
return res.data;
234+
} catch (error) { throw handleApiError(error); }
235+
},
236+
237+
getCompleted: async (): Promise<Task[]> => {
238+
try {
239+
const res = await api.get("/tasks/completed");
240+
return res.data;
241+
} catch (error) { throw handleApiError(error); }
242+
},
243+
230244
getClientTasks: async (): Promise<Task[]> => {
231245
try {
232246
const res = await api.get("/tasks/client-tasks");

0 commit comments

Comments
 (0)