Skip to content

Commit

Permalink
Add missing prefix helper to api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 14, 2023
1 parent 9b031be commit c7dbcaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Grid/configs/visualizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
Expand All @@ -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.`,
Expand Down

0 comments on commit c7dbcaf

Please sign in to comment.