13 lines
347 B
TypeScript
13 lines
347 B
TypeScript
import { fetchSubscriptions } from '$lib/api';
|
|
import type { PageServerLoad } from './$types';
|
|
|
|
export const load: PageServerLoad = async () => {
|
|
try {
|
|
const subscriptions = await fetchSubscriptions();
|
|
return { subscriptions };
|
|
} catch (error) {
|
|
console.error('Failed to load subscriptions:', error);
|
|
return { subscriptions: [] };
|
|
}
|
|
};
|