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:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homepage",
|
||||
"version": "1.46.16",
|
||||
"version": "1.46.17",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user