Should have saved my work earlier... General clean up of initial API calls and saving to IDB. Other fixes and updates.
This commit is contained in:
@@ -11,7 +11,7 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
{
|
||||
api_cfg,
|
||||
event_location_id,
|
||||
try_cache=false,
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
}: {
|
||||
api_cfg: any,
|
||||
@@ -36,8 +36,13 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
})
|
||||
.then(function (event_location_obj_get_result) {
|
||||
if (event_location_obj_get_result) {
|
||||
// This is expecting a list
|
||||
handle_db_save_ae_obj_li__event_location({obj_type: 'event_location', obj_li: [event_location_obj_get_result]});
|
||||
if (try_cache) {
|
||||
// This is expecting a list
|
||||
handle_db_save_ae_obj_li__event_location({
|
||||
obj_type: 'event_location',
|
||||
obj_li: [event_location_obj_get_result]
|
||||
});
|
||||
}
|
||||
return event_location_obj_get_result;
|
||||
} else {
|
||||
console.log('No results returned.');
|
||||
@@ -97,7 +102,12 @@ export async function handle_load_ae_obj_li__event_location(
|
||||
})
|
||||
.then(function (event_location_obj_li_get_result) {
|
||||
if (event_location_obj_li_get_result) {
|
||||
handle_db_save_ae_obj_li__event_location({obj_type: 'event_location', obj_li: event_location_obj_li_get_result});
|
||||
if (try_cache) {
|
||||
handle_db_save_ae_obj_li__event_location({
|
||||
obj_type: 'event_location',
|
||||
obj_li: event_location_obj_li_get_result
|
||||
});
|
||||
}
|
||||
return event_location_obj_li_get_result;
|
||||
} else {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user