Quickly saving in progress changes. We are working on why the IDAA Recovery Meetings are not loading. 403 errors.

This commit is contained in:
Scott Idem
2026-01-19 19:37:18 -05:00
parent 0e411531eb
commit 6380effa90
5 changed files with 92 additions and 27 deletions

View File

@@ -74,6 +74,21 @@ export async function load({ fetch, params, parent, route, url }) {
// Initialize API fetch with SvelteKit fetch
ae_api_init['fetch'] = fetch;
// IMMEDIATE AUTH SYNC: Read JWT from localStorage to avoid race conditions
if (typeof localStorage !== 'undefined') {
try {
const ae_loc_raw = localStorage.getItem('ae_loc');
if (ae_loc_raw) {
const ae_loc_json = JSON.parse(ae_loc_raw);
if (ae_loc_json.jwt) {
ae_api_init['jwt'] = ae_loc_json.jwt;
}
}
} catch (e) {
// Silently fail on storage read
}
}
const ae_loc_init: key_val = {};
const ds_code_li: null | key_val = {};