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

export const load: PageServerLoad = async () => {
    try {
        const resPix = await fetch("https://pixelfed.scot/users/fbface.atom");
        const xmlPix = await resPix.text();
        const resGit = await fetch("https://git.fjla.uk/fred.boniface.rss");
        const xmlGit = await resGit.text();
        const data = {pixelfed: xmlPix, gitea: xmlGit}
        console.log(JSON.stringify(data))
        return data
    } catch (err) {
        console.error("Error in load function", err)
    }
}