diff --git a/apps/web/app/api/task-priorities/[id]/route.ts b/apps/web/app/api/task-priorities/[id]/route.ts index a32723b97..94f779cc2 100644 --- a/apps/web/app/api/task-priorities/[id]/route.ts +++ b/apps/web/app/api/task-priorities/[id]/route.ts @@ -31,11 +31,11 @@ export async function DELETE(req: Request, { params }: { params: { id: string } const { id } = params; - return $res( - await deleteTaskPrioritiesRequest({ - id, - bearer_token: access_token, - tenantId - }) - ); + const response = await deleteTaskPrioritiesRequest({ + id, + bearer_token: access_token, + tenantId + }); + + return $res(response.data); } diff --git a/apps/web/app/services/client/api/task-priorities.ts b/apps/web/app/services/client/api/task-priorities.ts index 4662193a0..35f8d1b46 100644 --- a/apps/web/app/services/client/api/task-priorities.ts +++ b/apps/web/app/services/client/api/task-priorities.ts @@ -1,5 +1,5 @@ import { DeleteResponse, ITaskPrioritiesCreate, ITaskPrioritiesItemList, PaginationResponse } from '@app/interfaces'; -import api, { get, post, put } from '../axios'; +import { deleteApi, get, post, put } from '../axios'; export function createTaskPrioritiesAPI(data: ITaskPrioritiesCreate, tenantId?: string) { return post('/task-priorities', data, { @@ -14,7 +14,7 @@ export function editTaskPrioritiesAPI(id: string, data: ITaskPrioritiesCreate, t } export function deleteTaskPrioritiesAPI(id: string) { - return api.delete(`/task-priorities/${id}`); + return deleteApi(`/task-priorities/${id}`); } export async function getTaskPrioritiesList(