Skip to content

Commit

Permalink
implement GET /tasks/employee/:id api frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesNg35 committed Jan 26, 2024
1 parent 0e4ece0 commit 00e3017
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions apps/web/app/api/tasks/employee/[employeeId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ export async function GET(req: Request, { params }: { params: { employeeId: stri
organizationTeamId: string;
};

return $res(
await getEmployeeTasksRequest({
tenantId,
employeeId,
organizationTeamId,
bearer_token
})
);
const response = await getEmployeeTasksRequest({
tenantId,
employeeId,
organizationTeamId,
bearer_token
});

return $res(response.data);
}

export async function DELETE(req: Request, { params }: { params: { employeeId: string } }) {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/services/client/api/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,5 @@ export function deleteEmployeeFromTasksAPI(employeeId: string, organizationTeamI
}

export function getTasksByEmployeeIdAPI(employeeId: string, organizationTeamId: string) {
return api.get<ITeamTask[]>(`/tasks/employee/${employeeId}?organizationTeamId=${organizationTeamId}`);
return get<ITeamTask[]>(`/tasks/employee/${employeeId}?organizationTeamId=${organizationTeamId}`);
}

0 comments on commit 00e3017

Please sign in to comment.