aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/components/FeedItems.test.tsx4
-rw-r--r--frontend/src/utils.ts1
2 files changed, 4 insertions, 1 deletions
diff --git a/frontend/src/components/FeedItems.test.tsx b/frontend/src/components/FeedItems.test.tsx
index 6ffd026..555d8a2 100644
--- a/frontend/src/components/FeedItems.test.tsx
+++ b/frontend/src/components/FeedItems.test.tsx
@@ -106,6 +106,7 @@ describe('FeedItems Component', () => {
expect.objectContaining({
method: 'PUT',
body: JSON.stringify({ read: true, starred: false }),
+ credentials: 'include',
})
);
});
@@ -124,7 +125,8 @@ describe('FeedItems Component', () => {
'/api/item/102',
expect.objectContaining({
method: 'PUT',
- body: JSON.stringify({ read: true, starred: true }), // toggled to true
+ body: JSON.stringify({ read: true, starred: true }),
+ credentials: 'include', // toggled to true
})
);
});
diff --git a/frontend/src/utils.ts b/frontend/src/utils.ts
index 129ebbb..ebfb692 100644
--- a/frontend/src/utils.ts
+++ b/frontend/src/utils.ts
@@ -27,5 +27,6 @@ export async function apiFetch(input: RequestInfo | URL, init?: RequestInit): Pr
return fetch(input, {
...init,
headers,
+ credentials: 'include', // Ensure cookies are sent
});
}