Making the loading a bit more efficient and cleaner
This commit is contained in:
@@ -33,7 +33,7 @@ type key_val = {
|
||||
|
||||
// *** BEGIN *** Longer-term app data. This should be stored to local storage.
|
||||
export let ae_app_local_data_struct: key_val = {
|
||||
'ver': '0.0.7',
|
||||
'ver': '2024-02-22_17',
|
||||
'name': 'Aether App Template',
|
||||
'theme': 'light',
|
||||
|
||||
@@ -87,7 +87,7 @@ export let ae_loc: Writable<key_val> = localStorageStore('ae_loc', ae_app_local_
|
||||
|
||||
// *** BEGIN *** Temporary app data. This should be stored to session storage.
|
||||
export let ae_app_session_data_struct: key_val = {
|
||||
'ver': '0.0.2',
|
||||
'ver': '2024-02-22_17',
|
||||
// 'name': 'Aether App Template',
|
||||
// 'theme': 'light',
|
||||
'account_id': ae_account_id,
|
||||
@@ -99,7 +99,7 @@ export let ae_sess = writable(ae_app_session_data_struct);
|
||||
|
||||
// *** BEGIN *** Temporary API data. This should be stored to session storage.
|
||||
export let ae_api_data_struct: key_val = {
|
||||
'ver': '0.0.2',
|
||||
'ver': '2024-02-22_17',
|
||||
'base_url': api_base_url,
|
||||
'base_url_bak': api_base_url_bak,
|
||||
'api_secret_key': api_secret_key, // 'YOUR_API_SECRET_KEY',
|
||||
|
||||
@@ -494,6 +494,7 @@ export let post_object = async function post_object({api_cfg=null, endpoint='',
|
||||
// Updated 2023-12-01
|
||||
export let get_ae_obj_id_crud = async function get_ae_obj_id_crud({
|
||||
api_cfg,
|
||||
no_account_id=false,
|
||||
obj_type,
|
||||
obj_id,
|
||||
use_alt_table=false,
|
||||
@@ -576,6 +577,8 @@ export let get_ae_obj_id_crud = async function get_ae_obj_id_crud({
|
||||
endpoint = `/crud/post/comment/${obj_id}`;
|
||||
} else if (obj_type == 'site') {
|
||||
endpoint = `/crud/site/${obj_id}`;
|
||||
} else if (obj_type == 'site_domain') {
|
||||
endpoint = `/crud/site/domain/${obj_id}`;
|
||||
} else if (obj_type == 'sponsorship_cfg') {
|
||||
endpoint = `/crud/sponsorship/cfg/${obj_id}`;
|
||||
} else if (obj_type == 'sponsorship') {
|
||||
@@ -597,6 +600,10 @@ export let get_ae_obj_id_crud = async function get_ae_obj_id_crud({
|
||||
console.log('Params:', params);
|
||||
}
|
||||
|
||||
if (no_account_id) {
|
||||
headers['x_no_account_id_token'] = 'Nothing to See Here'; // get_object() will fix the underscores to dashes
|
||||
}
|
||||
|
||||
let object_obj_get_promise = await get_object({
|
||||
api_cfg: api_cfg,
|
||||
endpoint: endpoint,
|
||||
|
||||
Reference in New Issue
Block a user