From 3d0cf7930491feb39209c670dcacabba3e3aab77 Mon Sep 17 00:00:00 2001 From: scosman Date: Fri, 30 Aug 2024 21:11:59 -0400 Subject: [PATCH] Don't recall safeGetSession, already in the hook --- src/routes/(marketing)/login/+layout.server.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/routes/(marketing)/login/+layout.server.ts b/src/routes/(marketing)/login/+layout.server.ts index 603b7fe9..019d6373 100644 --- a/src/routes/(marketing)/login/+layout.server.ts +++ b/src/routes/(marketing)/login/+layout.server.ts @@ -2,12 +2,11 @@ import { redirect } from "@sveltejs/kit" import type { LayoutServerLoad } from "./$types" export const load: LayoutServerLoad = async ({ - url, - locals: { safeGetSession }, + locals: { session }, cookies, + url, }) => { // if the user is already logged in return them to the account page - const { session } = await safeGetSession() if (session) { redirect(303, "/account") }