astro-tractstack 2.0.0-rc.29 → 2.0.0-rc.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
orphanAnalysisStore,
|
|
8
8
|
loadOrphanAnalysis,
|
|
9
9
|
} from '@/stores/orphanAnalysis';
|
|
10
|
+
import { TractStackAPI } from '@/utils/api';
|
|
10
11
|
import UsageCell from '../UsageCell';
|
|
11
12
|
import type { FullContentMapItem } from '@/types/tractstack';
|
|
12
13
|
|
|
@@ -138,17 +139,13 @@ const StoryFragmentTable = ({
|
|
|
138
139
|
|
|
139
140
|
setIsLoading(true);
|
|
140
141
|
try {
|
|
141
|
-
const
|
|
142
|
+
const api = new TractStackAPI(
|
|
143
|
+
window.TRACTSTACK_CONFIG?.tenantId || 'default'
|
|
144
|
+
);
|
|
145
|
+
await api.request(`/api/v1/nodes/storyfragments/${id}`, {
|
|
142
146
|
method: 'DELETE',
|
|
143
|
-
headers: {
|
|
144
|
-
'Content-Type': 'application/json',
|
|
145
|
-
},
|
|
146
147
|
});
|
|
147
148
|
|
|
148
|
-
if (!response.ok) {
|
|
149
|
-
throw new Error('Failed to delete story fragment');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
149
|
// Reload the page to refresh the data
|
|
153
150
|
window.location.reload();
|
|
154
151
|
} catch (error) {
|