import { redirect } from "@sveltejs/kit";

export async function load({ locals }) {
  if (!locals.authStatus.authenticated) {
    throw redirect(302, "/login");
  }
  return { authStatus: locals.authStatus };
}
