import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async ({ fetch }) => {
  const res = await fetch('/api/integrations/feeds', { method: 'GET', headers: { 'cache-control': 'no-store' } });
  if (!res.ok) {
    return {
      personal: { url: null },
      aggregate: { url: null },
      groups: []
    };
  }
  const data = await res.json();
  return data;
};
