From 9fd84183d7c9f3315c5b99e8ba5ac544e8c6b936 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Mon, 16 Sep 2024 16:25:53 -0400 Subject: [PATCH] Renaming the page access code to site access code. --- src/routes/+layout.ts | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 873bced9..de5deb56 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -160,6 +160,8 @@ export async function load({ fetch, params, parent, route, url }) { // params, r ae_loc_init['site_header_image_path'] = site_domain_results.header_image_path; ae_loc_init['site_style_href'] = site_domain_results.style_href; ae_loc_init['site_google_tracking_id'] = site_domain_results.google_tracking_id; + ae_loc_init['site_access_code_kv'] = site_domain_results.access_code_kv_json; + ae_loc_init['page_access_code_li'] = site_domain_results.access_code_kv_json; // Old style. This is only temporary. Start using site_*_kv version. ae_loc_init['site_cfg_json'] = site_domain_results.cfg_json; console.log(`root layout.ts: Returning account_id = `, site_domain_results.account_id_random); @@ -182,26 +184,26 @@ export async function load({ fetch, params, parent, route, url }) { // params, r // console.log(ae_loc_init); // NOTE: We need to wait for the account_id to be returned before we can continue. It is required for the api_cfg. - let ds_type: null|string = 'json'; - ds_code = 'hub__page__access_code_li_json'; - // console.log(`INFO: ae_ account_id = `, account_id); - // ae_acct['ds'][ds_code] - ds_code_li[ds_code] = await core_func.handle_load_ae_obj_code__data_store({ - api_cfg: ae_api_init, - code: ds_code, - data_type: ds_type, - save_idb: false - }) - .then(function (ds_results) { - if (ds_results) { - console.log(`ae_ ds_results = `, ds_results); - return ds_results; - } + // let ds_type: null|string = 'json'; + // ds_code = 'hub__page__access_code_li_json'; + // // console.log(`INFO: ae_ account_id = `, account_id); + // // ae_acct['ds'][ds_code] + // ds_code_li[ds_code] = await core_func.handle_load_ae_obj_code__data_store({ + // api_cfg: ae_api_init, + // code: ds_code, + // data_type: ds_type, + // save_idb: false + // }) + // .then(function (ds_results) { + // if (ds_results) { + // console.log(`ae_ ds_results = `, ds_results); + // return ds_results; + // } - } - ); + // } + // ); - ae_loc_init['page_access_code_li'] = ds_code_li['hub__page__access_code_li_json']; + // ae_loc_init['page_access_code_li'] = ds_code_li['hub__page__access_code_li_json']; ae_acct['api'] = ae_api_init; ae_acct['loc'] = ae_loc_init;