Skip to content

Commit 1a1295b

Browse files
committed
auth token isssue with transition functions in the nodecard
1 parent ad9592d commit 1a1295b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

nodebook-base/frontend/src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ function App({ onLogout, onGoToDashboard, user }: AppProps) {
159159

160160
const response = await authenticatedFetch(`/api/graphs/${activeGraphId}/nodes/${nodeId}/morph`, {
161161
method: 'POST',
162+
headers: { 'Content-Type': 'application/json' },
162163
body: JSON.stringify({ morphId })
163164
});
164165

@@ -400,6 +401,7 @@ function App({ onLogout, onGoToDashboard, user }: AppProps) {
400401
try {
401402
const res = await authenticatedFetch(`/api/graphs/${activeGraphId}/cnl`, {
402403
method: 'PUT',
404+
headers: { 'Content-Type': 'application/json' },
403405
body: JSON.stringify({ cnlText: cnlText }),
404406
});
405407

@@ -435,6 +437,7 @@ function App({ onLogout, onGoToDashboard, user }: AppProps) {
435437

436438
const res = await authenticatedFetch(`/api/graphs/${activeGraphId}/cnl`, {
437439
method: 'PUT',
440+
headers: { 'Content-Type': 'application/json' },
438441
body: JSON.stringify({ cnlText: value })
439442
});
440443

@@ -731,6 +734,7 @@ function App({ onLogout, onGoToDashboard, user }: AppProps) {
731734
try {
732735
const res = await authenticatedFetch(`/api/graphs/${activeGraphId}/mode`, {
733736
method: 'PUT',
737+
headers: { 'Content-Type': 'application/json' },
734738
body: JSON.stringify({ mode: newMode })
735739
});
736740
if (res.ok) {
@@ -847,6 +851,7 @@ function App({ onLogout, onGoToDashboard, user }: AppProps) {
847851
try {
848852
const res = await authenticatedFetch(`/api/graphs/${activeGraphId}/mode`, {
849853
method: 'PUT',
854+
headers: { 'Content-Type': 'application/json' },
850855
body: JSON.stringify({ mode: newMode })
851856
});
852857
if (res.ok) {

nodebook-base/frontend/src/NodeCard.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export function NodeCard({ node, allNodes, allRelations, attributes, isActive, o
121121

122122
await authenticatedFetch(`${API_BASE_URL}/api/graphs/${node.graphId}/nodes/${node.id}/publication`, {
123123
method: 'PUT',
124+
headers: { 'Content-Type': 'application/json' },
124125
body: JSON.stringify({ publication_mode: nextMode }),
125126
});
126127
};
@@ -149,6 +150,7 @@ export function NodeCard({ node, allNodes, allRelations, attributes, isActive, o
149150

150151
const res = await authenticatedFetch(`${API_BASE_URL}/api/graphs/${targetGraphId}/preview`, {
151152
method: 'PUT',
153+
headers: { 'Content-Type': 'application/json' },
152154
body: JSON.stringify({ preview_url: previewUrl, node_id: node.id })
153155
});
154156
if (!res.ok) throw new Error('Failed to set preview');

0 commit comments

Comments
 (0)