Initial work on finally creating and implementing more generic and standardized CRUD functions for my Aether objects. It should work very well for Delete, Create, and Update. Load and Load List will need more work.

This commit is contained in:
Scott Idem
2025-08-01 17:30:30 -04:00
parent 9ed4bd85e1
commit 0a4940161d
6 changed files with 722 additions and 47 deletions

View File

@@ -104,35 +104,35 @@ export async function load_ae_obj_id__journal(
}
if (inc_entry_li) {
// Load the entries for the journal
if (log_lvl) {
console.log(`Need to load the entry list for the journal now`);
}
let load_journal_entry_obj_li = load_ae_obj_li__journal_entry({
api_cfg: api_cfg,
for_obj_type: 'journal',
for_obj_id: journal_id,
enabled: enabled, // all, disabled, enabled
hidden: hidden, // all, hidden, not_hidden
limit: limit, // Limit for the entries
offset: offset,
order_by_li: order_by_li,
params: params,
try_cache: try_cache,
log_lvl: log_lvl
})
.then((journal_entry_obj_li) => {
if (log_lvl) {
console.log(`journal_entry_obj_li = `, journal_entry_obj_li);
}
return journal_entry_obj_li;
});
if (log_lvl) {
console.log(`journal_entry_obj_li = `, load_journal_entry_obj_li);
}
ae_promises.load__journal_obj.journal_entry_li = load_journal_entry_obj_li;
// Load the entries for the journal
if (log_lvl) {
console.log(`Need to load the entry list for the journal now`);
}
let load_journal_entry_obj_li = load_ae_obj_li__journal_entry({
api_cfg: api_cfg,
for_obj_type: 'journal',
for_obj_id: journal_id,
enabled: enabled, // all, disabled, enabled
hidden: hidden, // all, hidden, not_hidden
limit: limit, // Limit for the entries
offset: offset,
order_by_li: order_by_li,
params: params,
try_cache: try_cache,
log_lvl: log_lvl
})
.then((journal_entry_obj_li) => {
if (log_lvl) {
console.log(`journal_entry_obj_li = `, journal_entry_obj_li);
}
return journal_entry_obj_li;
});
if (log_lvl) {
console.log(`journal_entry_obj_li = `, load_journal_entry_obj_li);
}
ae_promises.load__journal_obj.journal_entry_li = load_journal_entry_obj_li;
}
return ae_promises.load__journal_obj;
}