mirror of
https://github.com/directus/directus.git
synced 2026-01-25 12:48:07 -05:00
Fix api call for insights list panel (#18631)
* fix api call for panel list * Create many-shoes-pull.md
This commit is contained in:
5
.changeset/many-shoes-pull.md
Normal file
5
.changeset/many-shoes-pull.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@directus/app": patch
|
||||
---
|
||||
|
||||
Fixed api endpoint for insights list panel
|
||||
@@ -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<string, any>) {
|
||||
try {
|
||||
await api.patch(`/items/${props.collection}/${currentlyEditing.value}`, item);
|
||||
await api.patch(`${getEndpoint(props.collection)}/${currentlyEditing.value}`, item);
|
||||
} catch (err: any) {
|
||||
unexpectedError(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user