From 1a7327d7c1792745e574fa0977c256e17fb9e58a Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Fri, 15 Nov 2024 14:55:47 +0100 Subject: [PATCH] Removes non-existent config property usage Eliminates references to a non-existent config property *stored_workflow_menu_entries* in useWorkflowActions to prevent errors and clean up the code. Client does not have access to this property anymore and is not used anywhere --- .../components/Workflow/List/useWorkflowActions.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/client/src/components/Workflow/List/useWorkflowActions.ts b/client/src/components/Workflow/List/useWorkflowActions.ts index 8b0855fb4bc0..26a152699913 100644 --- a/client/src/components/Workflow/List/useWorkflowActions.ts +++ b/client/src/components/Workflow/List/useWorkflowActions.ts @@ -5,7 +5,6 @@ import { deleteWorkflow as deleteWorkflowService, updateWorkflow as updateWorkflowService, } from "@/components/Workflow/workflows.services"; -import { useConfig } from "@/composables/config"; import { useConfirmDialog } from "@/composables/confirmDialog"; import { useToast } from "@/composables/toast"; import { copy } from "@/utils/clipboard"; @@ -17,7 +16,6 @@ type Workflow = any; export function useWorkflowActions(workflow: Ref, refreshCallback: () => void) { const toast = useToast(); - const { config } = useConfig() as { config: Record }; const bookmarkLoading = ref(false); @@ -30,18 +28,6 @@ export function useWorkflowActions(workflow: Ref, refreshCallback: () }); toast.info(`Workflow ${checked ? "added to" : "removed from"} bookmarks`); - - if (checked) { - config.stored_workflow_menu_entries.push({ - id: workflow.value.id, - name: workflow.value.name, - }); - } else { - const indexToRemove = config.stored_workflow_menu_entries.findIndex( - (w: Workflow) => w.id === workflow.value.id - ); - config.stored_workflow_menu_entries.splice(indexToRemove, 1); - } } catch (error) { toast.error("Failed to update workflow bookmark status"); } finally {