import type { PageServerLoad } from './$types';
import { getBackofficeDashboard } from '$lib/server/backoffice';

export const load: PageServerLoad = async ({ url }) => {
	const dashboard = await getBackofficeDashboard();

	return {
		...dashboard,
		forbidden: url.searchParams.get('error') === 'forbidden'
	};
};
