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

@@ -86,20 +86,17 @@ export const patch_object = async function patch_object({
// Auto-inject Authorization header if JWT is present but header is missing
let jwt = headers_cleaned['jwt'] ||
headers_cleaned['JWT'] ||
headers_cleaned['x-aether-api-token'] ||
api_cfg['jwt'] ||
api_cfg['headers']?.['jwt'] ||
api_cfg['headers']?.['JWT'] ||
api_cfg['headers']?.['x-aether-api-token'];
api_cfg['headers']?.['JWT'];
// Final Fallback: Check localStorage directly to avoid store sync race conditions
// Final Fallback: Direct check of primary ae_loc key
if (!jwt && typeof localStorage !== 'undefined') {
try {
// Check primary key first
const ae_loc_raw = localStorage.getItem('ae_loc');
if (ae_loc_raw) {
const ae_loc_json = JSON.parse(ae_loc_raw);
jwt = ae_loc_json.jwt || ae_loc_json.token;
const raw = localStorage.getItem('ae_loc');
if (raw) {
const json = JSON.parse(raw);
if (json.jwt) jwt = json.jwt;
}
} catch (e) {
// Silently fail on storage read