Skip to content

Commit 47b14dd

Browse files
fix firebase cookie issue (#500)
Co-authored-by: Alex Patterson <alex.patterson@fusionauth.io>
1 parent 118c97d commit 47b14dd

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

apps/codingcatdev/src/routes/+layout.server.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ import { preview } from '$lib/server/content';
66

77
//export const prerender = false;
88
export const load = async ({ cookies }: { cookies: Cookies }) => {
9+
// Get latest podcast
10+
const podcasts = (
11+
await listContent<Content>({
12+
contentItems: await getContentTypeDirectory<Content>(ContentType.podcast),
13+
limit: 5
14+
})
15+
).content;
916
try {
10-
// Get latest podcast
11-
const podcasts = (
12-
await listContent<Content>({
13-
contentItems: await getContentTypeDirectory<Content>(ContentType.podcast),
14-
limit: 5
15-
})
16-
).content;
17-
1817
const ccdsession = cookies.get('session');
1918
if (!ccdsession) {
2019
return {
@@ -39,6 +38,9 @@ export const load = async ({ cookies }: { cookies: Cookies }) => {
3938
cookies.set('session', '', { expires: new Date(0) });
4039

4140
console.error(error);
42-
return { preview };
41+
return {
42+
podcasts,
43+
preview
44+
};
4345
}
4446
};

0 commit comments

Comments
 (0)