From 802feeda5d8bbf2084dd9456023ccf20f3f5b92a Mon Sep 17 00:00:00 2001 From: SilviaAmAm Date: Fri, 20 Dec 2024 14:44:37 +0100 Subject: [PATCH] :recycle: [#558] Refactor function names --- frontend/src/lib/api/destructionLists.ts | 2 +- .../detail/DestructionListDetail.action.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/api/destructionLists.ts b/frontend/src/lib/api/destructionLists.ts index 77953145..888537a8 100644 --- a/frontend/src/lib/api/destructionLists.ts +++ b/frontend/src/lib/api/destructionLists.ts @@ -186,7 +186,7 @@ export async function markDestructionListAsFinal( * @param uuid * @returns */ -export async function destroyDestructionList(uuid: string) { +export async function destructionListQueueDestruction(uuid: string) { const response = await request( "POST", `/destruction-lists/${uuid}/queue_destruction/`, diff --git a/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts b/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts index f96a658a..bc830152 100644 --- a/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts +++ b/frontend/src/pages/destructionlist/detail/DestructionListDetail.action.ts @@ -4,7 +4,7 @@ import { redirect } from "react-router-dom"; import { JsonValue, TypedAction } from "../../../hooks"; import { abort, - destroyDestructionList, + destructionListQueueDestruction, markDestructionListAsFinal, markDestructionListAsReadyToReview, updateDestructionList, @@ -37,7 +37,7 @@ export async function destructionListUpdateAction({ switch (action.type) { case "QUEUE_DESTRUCTION": - return await destructionListDestroyAction({ request, params }); + return await destructionListQueueDestructionAction({ request, params }); case "MAKE_FINAL": return await destructionListMakeFinalAction({ request, params }); case "PROCESS_REVIEW": @@ -73,12 +73,12 @@ export async function destructionListMakeFinalAction({ /** * React Router action (user intents to DESTROY ALL ZAKEN ON THE DESTRUCTION LIST!). */ -export async function destructionListDestroyAction({ +export async function destructionListQueueDestructionAction({ request, }: ActionFunctionArgs) { const { payload } = await request.json(); try { - await destroyDestructionList(payload.uuid); + await destructionListQueueDestruction(payload.uuid); } catch (e: unknown) { if (e instanceof Response) { return await (e as Response).json();