Should have saved earlier...
This commit is contained in:
@@ -18,11 +18,13 @@ async function handle_load_ae_obj_id__site_domain(
|
|||||||
api_cfg,
|
api_cfg,
|
||||||
fqdn,
|
fqdn,
|
||||||
try_cache=false,
|
try_cache=false,
|
||||||
|
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,
|
||||||
log_lvl: number
|
log_lvl: number
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
@@ -46,6 +48,7 @@ async function handle_load_ae_obj_id__site_domain(
|
|||||||
use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config.
|
use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config.
|
||||||
use_alt_base: true, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config.
|
use_alt_base: true, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config.
|
||||||
params: params,
|
params: params,
|
||||||
|
timeout: timeout,
|
||||||
log_lvl: log_lvl
|
log_lvl: log_lvl
|
||||||
})
|
})
|
||||||
.then(function (site_domain_obj_get_result) {
|
.then(function (site_domain_obj_get_result) {
|
||||||
@@ -80,6 +83,7 @@ async function handle_load_ae_obj_code__data_store(
|
|||||||
for_id=null,
|
for_id=null,
|
||||||
try_cache=true,
|
try_cache=true,
|
||||||
save_idb=false,
|
save_idb=false,
|
||||||
|
timeout=9000,
|
||||||
log_lvl=0
|
log_lvl=0
|
||||||
}: {
|
}: {
|
||||||
api_cfg: any,
|
api_cfg: any,
|
||||||
@@ -89,6 +93,7 @@ async function handle_load_ae_obj_code__data_store(
|
|||||||
for_id: string|null,
|
for_id: string|null,
|
||||||
try_cache: boolean,
|
try_cache: boolean,
|
||||||
save_idb: boolean,
|
save_idb: boolean,
|
||||||
|
timeout: number,
|
||||||
log_lvl: number
|
log_lvl: number
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
@@ -110,6 +115,7 @@ async function handle_load_ae_obj_code__data_store(
|
|||||||
api_cfg: api_cfg,
|
api_cfg: api_cfg,
|
||||||
data_store_code: code,
|
data_store_code: code,
|
||||||
data_type: data_type,
|
data_type: data_type,
|
||||||
|
timeout: timeout,
|
||||||
log_lvl: log_lvl
|
log_lvl: log_lvl
|
||||||
})
|
})
|
||||||
.then(function (get_ds_result) {
|
.then(function (get_ds_result) {
|
||||||
|
|||||||
@@ -556,6 +556,7 @@ export let get_ae_obj_id_crud = async function get_ae_obj_id_crud({
|
|||||||
jwt=null,
|
jwt=null,
|
||||||
headers={},
|
headers={},
|
||||||
params={},
|
params={},
|
||||||
|
timeout=25000,
|
||||||
return_meta=false,
|
return_meta=false,
|
||||||
log_lvl=0}) {
|
log_lvl=0}) {
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
@@ -673,6 +674,7 @@ export let get_ae_obj_id_crud = async function get_ae_obj_id_crud({
|
|||||||
endpoint: endpoint,
|
endpoint: endpoint,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
params: params,
|
params: params,
|
||||||
|
timeout: timeout,
|
||||||
log_lvl: log_lvl
|
log_lvl: log_lvl
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1364,6 +1366,7 @@ export let get_data_store_obj_w_code = async function get_data_store_obj_w_code(
|
|||||||
data_type='text',
|
data_type='text',
|
||||||
headers={},
|
headers={},
|
||||||
params={},
|
params={},
|
||||||
|
timeout=25000,
|
||||||
log_lvl=0
|
log_lvl=0
|
||||||
}) {
|
}) {
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
@@ -1373,7 +1376,7 @@ export let get_data_store_obj_w_code = async function get_data_store_obj_w_code(
|
|||||||
// let get_item_result = window.localStorage.getItem(code);
|
// let get_item_result = window.localStorage.getItem(code);
|
||||||
|
|
||||||
const endpoint = `/data_store/code/${data_store_code}`;
|
const endpoint = `/data_store/code/${data_store_code}`;
|
||||||
let data_store_obj_get_promise = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, headers: headers, params: params, timeout: 3000, log_lvl: log_lvl});
|
let data_store_obj_get_promise = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, headers: headers, params: params, timeout: timeout, log_lvl: log_lvl});
|
||||||
|
|
||||||
if (data_store_obj_get_promise === false) {
|
if (data_store_obj_get_promise === false) {
|
||||||
console.log('Data Store - RUN AGAIN WITH BACKUP');
|
console.log('Data Store - RUN AGAIN WITH BACKUP');
|
||||||
@@ -1382,7 +1385,7 @@ export let get_data_store_obj_w_code = async function get_data_store_obj_w_code(
|
|||||||
let temp_api = api_cfg;
|
let temp_api = api_cfg;
|
||||||
temp_api['base_url'] = temp_api['base_url_bak']
|
temp_api['base_url'] = temp_api['base_url_bak']
|
||||||
|
|
||||||
data_store_obj_get_promise = await api.get_object({api_cfg: temp_api, endpoint: endpoint, headers: headers, params: params, timeout: 6000, log_lvl: log_lvl});
|
data_store_obj_get_promise = await api.get_object({api_cfg: temp_api, endpoint: endpoint, headers: headers, params: params, timeout: timeout, log_lvl: log_lvl});
|
||||||
temp_api['base_url'] = original_api_base_url;
|
temp_api['base_url'] = original_api_base_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/** @type {import('./$types').LayoutLoad} */
|
/** @type {import('./$types').LayoutLoad} */
|
||||||
// console.log(`ae_root +layout.ts start`);
|
// console.log(`ae_root +layout.ts start`);
|
||||||
|
|
||||||
|
import { error } from '@sveltejs/kit';
|
||||||
import { get } from 'svelte/store';
|
import { get } from 'svelte/store';
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
|
|
||||||
@@ -169,7 +170,11 @@ export async function load({ fetch, params, parent, route, url }) { // params, r
|
|||||||
|
|
||||||
if (!account_id) {
|
if (!account_id) {
|
||||||
console.log(`root layout.ts: The account_id was not found in API response!!!`);
|
console.log(`root layout.ts: The account_id was not found in API response!!!`);
|
||||||
return false;
|
// return false;
|
||||||
|
// return;
|
||||||
|
error(500, {
|
||||||
|
message: 'Not found'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// console.log(ae_loc_init);
|
// console.log(ae_loc_init);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user