Making the loading a bit more efficient and cleaner
This commit is contained in:
@@ -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