From c7dbcaf551dceed4fb778c9d1f5643376e298ddf Mon Sep 17 00:00:00 2001 From: guerler Date: Sat, 11 Nov 2023 18:44:58 +0300 Subject: [PATCH] Add missing prefix helper to api calls --- client/src/components/Grid/configs/visualizations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Grid/configs/visualizations.ts b/client/src/components/Grid/configs/visualizations.ts index 17e223dfa020..2973dfec3cc2 100644 --- a/client/src/components/Grid/configs/visualizations.ts +++ b/client/src/components/Grid/configs/visualizations.ts @@ -122,7 +122,7 @@ const fields = [ condition: (data: VisualizationEntry) => !data.deleted, handler: async (data: VisualizationEntry) => { try { - await axios.put(`/api/visualizations/${data.id}`, { deleted: true }); + await axios.put(withPrefix(`/api/visualizations/${data.id}`), { deleted: true }); return { status: "success", message: `'${data.title}' has been deleted.`, @@ -141,7 +141,7 @@ const fields = [ condition: (data: VisualizationEntry) => data.deleted, handler: async (data: VisualizationEntry) => { try { - await axios.put(`/api/visualizations/${data.id}`, { deleted: false }); + await axios.put(withPrefix(`/api/visualizations/${data.id}`), { deleted: false }); return { status: "success", message: `'${data.title}' has been restored.`,