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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-tractstack",
3
- "version": "2.0.0-rc.29",
3
+ "version": "2.0.0-rc.30",
4
4
  "description": "Astro integration for TractStack - redeeming the web from boring experiences",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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 response = await fetch(`/api/storyfragments/${id}`, {
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) {