Skip to content

Commit

Permalink
implement DEL /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 7a9c6f4 commit 0e4ece0
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 @@ -36,12 +36,12 @@ export async function DELETE(req: Request, { params }: { params: { employeeId: s
organizationTeamId: string;
};

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

return $res(response.data);
}
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 @@ -269,7 +269,7 @@ export function allTaskTimesheetStatisticsAPI() {
}

export function deleteEmployeeFromTasksAPI(employeeId: string, organizationTeamId: string) {
return api.delete<DeleteResponse>(`/tasks/employee/${employeeId}?organizationTeamId=${organizationTeamId}`);
return deleteApi<DeleteResponse>(`/tasks/employee/${employeeId}?organizationTeamId=${organizationTeamId}`);
}

export function getTasksByEmployeeIdAPI(employeeId: string, organizationTeamId: string) {
Expand Down

0 comments on commit 0e4ece0

Please sign in to comment.