Code clean up. Journal IDB save has been updated to properly await.
This commit is contained in:
@@ -324,6 +324,8 @@ export async function delete_ae_obj_id__journal_entry(
|
||||
// return await ae_promises.update__journal_entry_obj;
|
||||
// }
|
||||
|
||||
|
||||
// Updated 2025-05-09
|
||||
export async function update_ae_obj__journal_entry(
|
||||
{
|
||||
api_cfg,
|
||||
@@ -344,6 +346,7 @@ export async function update_ae_obj__journal_entry(
|
||||
console.log(`*** update_ae_obj__journal_entry() *** journal_entry_id=${journal_entry_id}`, data_kv);
|
||||
}
|
||||
|
||||
// Perform the API update
|
||||
const result = await api.update_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'journal_entry',
|
||||
@@ -355,6 +358,7 @@ export async function update_ae_obj__journal_entry(
|
||||
log_lvl: log_lvl,
|
||||
});
|
||||
|
||||
// Handle the result
|
||||
if (result) {
|
||||
if (try_cache) {
|
||||
console.log('Saving to DB...');
|
||||
@@ -374,7 +378,7 @@ export async function update_ae_obj__journal_entry(
|
||||
|
||||
|
||||
// This function will loop through the journal_entry_obj_li and save each one to the DB.
|
||||
// Updated 2025-03-15
|
||||
// Updated 2025-05-09
|
||||
export async function db_save_ae_obj_li__journal_entry(
|
||||
{
|
||||
obj_type,
|
||||
|
||||
Reference in New Issue
Block a user