Work on adding files to a Journal Entry

This commit is contained in:
Scott Idem
2025-05-19 19:23:16 -04:00
parent 2976d618f8
commit 83a8377155
3 changed files with 263 additions and 6 deletions

View File

@@ -86,7 +86,7 @@ export async function load_ae_obj_li__hosted_file(
}
// Check if for_obj_type is in the list of valid Aether object types:
let valid_for_obj_types = ['account', 'archive', 'archive_content', 'event', 'event_session', 'event_presentation', 'event_presenter', 'event_location', 'post', 'post_comment'];
let valid_for_obj_types = ['account', 'archive', 'archive_content', 'event', 'event_session', 'event_presentation', 'event_presenter', 'event_location', 'journal', 'journal_entry', 'post', 'post_comment'];
if (!valid_for_obj_types.includes(for_obj_type)) {
console.log(`Invalid for_obj_type: ${for_obj_type}`);
return [];

View File

@@ -18,7 +18,7 @@ export async function db_save_ae_obj_li__ae_obj({
properties_to_save: string[];
log_lvl?: number;
}) {
log_lvl = 1;
// log_lvl = 1;
if (log_lvl) {
console.log(`*** db_save_ae_obj_li__ae_obj() *** table_name=${table_name}`, obj_li);
}
@@ -72,7 +72,7 @@ export async function db_save_ae_obj_li__ae_obj({
} catch (error) {
// This is fairly common and normal if the object is new
if (log_lvl) {
console.error(`Bulk update failed. Falling back to bulkPut.`, error);
console.log(`Bulk update failed. Falling back to bulkPut. This is normal.`, error);
}
}
@@ -85,7 +85,7 @@ export async function db_save_ae_obj_li__ae_obj({
return putKeys;
} catch (error) {
// This should not happen if the object is new
console.error(`Bulk put failed.`, error);
console.error(`Bulk put failed. Something likely went wrong!`, error);
return [];
}
}