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

export const load: PageServerLoad = async ({ platform }) => {
    if(platform && "env" in platform) {
        let id_ = platform!.env.USER.jurisdiction('eu').idFromName("faisan")
        let projets = await userForm(platform!.env, id_, {
            ListProjets: null
        })
        return { projets }
    } else {
        return { projets: [] }
    }
};