From bc66343e20dd5d2fdae2d5d53243ba2db15aa332 Mon Sep 17 00:00:00 2001 From: Brainslug Date: Tue, 16 May 2023 19:50:45 +0200 Subject: [PATCH] Fix api call for insights list panel (#18631) * fix api call for panel list * Create many-shoes-pull.md --- .changeset/many-shoes-pull.md | 5 +++++ app/src/panels/list/panel-list.vue | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/many-shoes-pull.md diff --git a/.changeset/many-shoes-pull.md b/.changeset/many-shoes-pull.md new file mode 100644 index 0000000000..bd9a719023 --- /dev/null +++ b/.changeset/many-shoes-pull.md @@ -0,0 +1,5 @@ +--- +"@directus/app": patch +--- + +Fixed api endpoint for insights list panel diff --git a/app/src/panels/list/panel-list.vue b/app/src/panels/list/panel-list.vue index 64eb715089..bf32717421 100644 --- a/app/src/panels/list/panel-list.vue +++ b/app/src/panels/list/panel-list.vue @@ -31,6 +31,7 @@ import api from '@/api'; import { useFieldsStore } from '@/stores/fields'; import { useInsightsStore } from '@/stores/insights'; import { unexpectedError } from '@/utils/unexpected-error'; +import { getEndpoint } from '@directus/utils'; const props = withDefaults( defineProps<{ @@ -70,7 +71,7 @@ function cancelEdit() { async function saveEdits(item: Record) { try { - await api.patch(`/items/${props.collection}/${currentlyEditing.value}`, item); + await api.patch(`${getEndpoint(props.collection)}/${currentlyEditing.value}`, item); } catch (err: any) { unexpectedError(err); }