perf: reuse locals.session from hook instead of re-awaiting locals.auth()

hooks.server.ts already awaits auth() once and stores the result on
locals.session. In-scope loaders (recipe list + filter views, rosary,
prayers, calendar — already done — and fitness stats) were awaiting
locals.auth() a second time per request.

Switched to the existing `locals.session ?? await locals.auth()` pattern
so the hook's result is reused. Also pulls session out of Promise.all
legs since it's now synchronous when the hook ran.

Scope: loaders only — actions, /admin, /edit, /add intentionally skipped.
This commit is contained in:
2026-04-23 15:06:05 +02:00
parent dfeeeb5fdf
commit 800a544190
14 changed files with 28 additions and 35 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "homepage",
"version": "1.46.16",
"version": "1.46.17",
"private": true,
"type": "module",
"scripts": {