File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
apps/codingcatdev/src/routes Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,14 @@ import { preview } from '$lib/server/content';
6
6
7
7
//export const prerender = false;
8
8
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 ;
9
16
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
-
18
17
const ccdsession = cookies . get ( 'session' ) ;
19
18
if ( ! ccdsession ) {
20
19
return {
@@ -39,6 +38,9 @@ export const load = async ({ cookies }: { cookies: Cookies }) => {
39
38
cookies . set ( 'session' , '' , { expires : new Date ( 0 ) } ) ;
40
39
41
40
console . error ( error ) ;
42
- return { preview } ;
41
+ return {
42
+ podcasts,
43
+ preview
44
+ } ;
43
45
}
44
46
} ;
You can’t perform that action at this time.
0 commit comments