diff --git a/frontend/.storybook/mockData.ts b/frontend/.storybook/mockData.ts index 8c3993a7b..25d764e26 100644 --- a/frontend/.storybook/mockData.ts +++ b/frontend/.storybook/mockData.ts @@ -112,9 +112,9 @@ export const MOCKS = { status: "200", response: FIXTURE_DESTRUCTION_LIST, }, - DESTRUCTION_LIST_DELETE: { - url: "http://localhost:8000/api/v1/destruction-lists/00000000-0000-0000-0000-000000000000", // FIXME - method: "DELETE", + DESTRUCTION_LIST_QUEUE_DESTRUCTION: { + url: "http://localhost:8000/api/v1/destruction-lists/00000000-0000-0000-0000-000000000000/queue_destruction/", + method: "POST", status: "200", response: {}, }, diff --git a/frontend/src/lib/api/destructionLists.ts b/frontend/src/lib/api/destructionLists.ts index 11f921f31..77953145a 100644 --- a/frontend/src/lib/api/destructionLists.ts +++ b/frontend/src/lib/api/destructionLists.ts @@ -188,13 +188,12 @@ export async function markDestructionListAsFinal( */ export async function destroyDestructionList(uuid: string) { const response = await request( - "DELETE", - `/destruction-lists/${uuid}/`, + "POST", + `/destruction-lists/${uuid}/queue_destruction/`, {}, { uuid }, ); - // Check if the response is a 201 Created status code. - if (response.status === 204) { + if (response.status === 200) { return null; } diff --git a/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts b/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts index 8af0a91c6..f96a658ae 100644 --- a/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts +++ b/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts @@ -16,7 +16,7 @@ import { import { clearZaakSelection } from "../../../lib/zaakSelection/zaakSelection"; export type UpdateDestructionListAction
= TypedAction<
- | "DESTROY"
+ | "QUEUE_DESTRUCTION"
| "CANCEL_DESTROY"
| "MAKE_FINAL"
| "PROCESS_REVIEW"
@@ -36,7 +36,7 @@ export async function destructionListUpdateAction({
const action = data as UpdateDestructionListAction