Trying to clean up things so they load faster.
This commit is contained in:
@@ -57,17 +57,17 @@ async function check_hosted_file_obj_w_hash(
|
|||||||
// Updated 2024-03-29
|
// Updated 2024-03-29
|
||||||
async function handle_load_ae_obj_id__site_domain(
|
async function handle_load_ae_obj_id__site_domain(
|
||||||
{
|
{
|
||||||
api_cfg,
|
api_cfg,
|
||||||
fqdn,
|
fqdn,
|
||||||
try_cache=false,
|
try_cache = false,
|
||||||
timeout=7000,
|
timeout = 7000,
|
||||||
log_lvl=0
|
log_lvl = 0
|
||||||
}: {
|
}: {
|
||||||
api_cfg: any,
|
api_cfg: any,
|
||||||
fqdn: string,
|
fqdn: string,
|
||||||
try_cache: boolean,
|
try_cache?: boolean,
|
||||||
timeout: number,
|
timeout?: number,
|
||||||
log_lvl: number
|
log_lvl?: number
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
console.log(`*** handle_load_ae_obj_id__site_domain() *** fqdn=${fqdn}`);
|
console.log(`*** handle_load_ae_obj_id__site_domain() *** fqdn=${fqdn}`);
|
||||||
@@ -118,25 +118,25 @@ async function handle_load_ae_obj_id__site_domain(
|
|||||||
// Updated 2024-03-29
|
// Updated 2024-03-29
|
||||||
async function handle_load_ae_obj_code__data_store(
|
async function handle_load_ae_obj_code__data_store(
|
||||||
{
|
{
|
||||||
api_cfg,
|
api_cfg,
|
||||||
code,
|
code,
|
||||||
data_type='text',
|
data_type = 'text',
|
||||||
for_type=null,
|
for_type = null,
|
||||||
for_id=null,
|
for_id = null,
|
||||||
try_cache=true,
|
try_cache = true,
|
||||||
save_idb=false,
|
save_idb = false,
|
||||||
timeout=9000,
|
timeout = 9000,
|
||||||
log_lvl=0
|
log_lvl = 0
|
||||||
}: {
|
}: {
|
||||||
api_cfg: any,
|
api_cfg: any,
|
||||||
code: string,
|
code: string,
|
||||||
data_type: string,
|
data_type?: string,
|
||||||
for_type: string|null,
|
for_type?: string|null,
|
||||||
for_id: string|null,
|
for_id?: string|null,
|
||||||
try_cache: boolean,
|
try_cache?: boolean,
|
||||||
save_idb: boolean,
|
save_idb?: boolean,
|
||||||
timeout: number,
|
timeout?: number,
|
||||||
log_lvl: number
|
log_lvl?: number
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ let ae_loc_init: key_val = {
|
|||||||
// properties: params, route, url
|
// properties: params, route, url
|
||||||
// functions: fetch, setHeaders, parent, depends, untrack
|
// functions: fetch, setHeaders, parent, depends, untrack
|
||||||
export async function load({ fetch, params, parent, route, url }) { // params, route, url
|
export async function load({ fetch, params, parent, route, url }) { // params, route, url
|
||||||
|
let log_lvl = 0;
|
||||||
// console.log(`Svelte root layout.ts params:`, params);
|
// console.log(`Svelte root layout.ts params:`, params);
|
||||||
// console.log(`Svelte root layout.ts route:`, route);
|
// console.log(`Svelte root layout.ts route:`, route);
|
||||||
// console.log(`Svelte root layout.ts url:`, url);
|
// console.log(`Svelte root layout.ts url:`, url);
|
||||||
@@ -131,8 +132,12 @@ export async function load({ fetch, params, parent, route, url }) { // params, r
|
|||||||
// ae_loc.site_domain = data.url.origin;
|
// ae_loc.site_domain = data.url.origin;
|
||||||
// console.log(`ae_loc = `, ae_loc);
|
// console.log(`ae_loc = `, ae_loc);
|
||||||
|
|
||||||
account_id = await core_func.handle_load_ae_obj_id__site_domain({api_cfg: ae_api_init, fqdn: url.host, try_cache: false, log_lvl: 1})
|
account_id = await core_func.handle_load_ae_obj_id__site_domain({
|
||||||
|
api_cfg: ae_api_init,
|
||||||
|
fqdn: url.host,
|
||||||
|
try_cache: false,
|
||||||
|
log_lvl: log_lvl
|
||||||
|
})
|
||||||
.then(function (site_domain_results) {
|
.then(function (site_domain_results) {
|
||||||
if (site_domain_results) {
|
if (site_domain_results) {
|
||||||
// console.log(`ae_ site_domain_results = `, site_domain_results);
|
// console.log(`ae_ site_domain_results = `, site_domain_results);
|
||||||
@@ -181,7 +186,12 @@ export async function load({ fetch, params, parent, route, url }) { // params, r
|
|||||||
ds_code = 'hub__page__access_code_li_json';
|
ds_code = 'hub__page__access_code_li_json';
|
||||||
// console.log(`INFO: ae_ account_id = `, account_id);
|
// console.log(`INFO: ae_ account_id = `, account_id);
|
||||||
// ae_acct['ds'][ds_code]
|
// 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})
|
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) {
|
.then(function (ds_results) {
|
||||||
if (ds_results) {
|
if (ds_results) {
|
||||||
console.log(`ae_ ds_results = `, ds_results);
|
console.log(`ae_ ds_results = `, ds_results);
|
||||||
|
|||||||
Reference in New Issue
Block a user