Skip to content

Commit

Permalink
♻️ [#558] Refactor function names
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Dec 20, 2024
1 parent 327149f commit 802feed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/api/destructionLists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { redirect } from "react-router-dom";
import { JsonValue, TypedAction } from "../../../hooks";
import {
abort,
destroyDestructionList,
destructionListQueueDestruction,
markDestructionListAsFinal,
markDestructionListAsReadyToReview,
updateDestructionList,
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 802feed

Please sign in to comment.