Support authenticated users in stats and page loading

This commit is contained in:
George Powell committed 2026-02-05 17:46:53 -05:00
1 parent 86f81cf9dd
commit 96024d5048
3 files changed
+35 -11

No files matched your search

+4 -2
View File
@@ -34,14 +34,16 @@ async function getTodayVerse(): Promise<DailyVerse> {
return inserted;
}
export const load: PageServerLoad = async () => {
export const load: PageServerLoad = async ({ locals }) => {
const dailyVerse = await getTodayVerse();
const correctBook = getBookById(dailyVerse.bookId) ?? null;
return {
dailyVerse,
correctBookId: dailyVerse.bookId,
correctBook
correctBook,
user: locals.user,
session: locals.session
};
};