More general code clean up. More removing of the _random bits.
This commit is contained in:
@@ -198,7 +198,7 @@
|
||||
});
|
||||
|
||||
local_ids = local_results
|
||||
.map((e) => e.id || e.journal_entry_id_random)
|
||||
.map((e) => e.id || e.journal_entry_id)
|
||||
.filter(Boolean);
|
||||
|
||||
if (current_search_id === last_search_id) {
|
||||
@@ -235,7 +235,7 @@
|
||||
if (current_search_id === last_search_id) {
|
||||
const api_results = results || [];
|
||||
const api_ids = api_results
|
||||
.map((e: any) => e.id || e.journal_entry_id_random)
|
||||
.map((e: any) => e.id || e.journal_entry_id)
|
||||
.filter(Boolean);
|
||||
|
||||
// Protect UI cache if API returns empty during revalidation
|
||||
|
||||
@@ -4,11 +4,6 @@ console.log(`ae_p_journals [journal_entry_id] +page.ts start`);
|
||||
|
||||
import { browser } from '$app/environment';
|
||||
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
|
||||
import {
|
||||
db_journals,
|
||||
journal_entry_field_li
|
||||
} from '$lib/ae_journals/db_journals';
|
||||
import { load_ae_obj_id } from '$lib/ae_core/core__crud_generic';
|
||||
|
||||
export async function load({ params, parent }) {
|
||||
// route
|
||||
@@ -68,15 +63,6 @@ export async function load({ params, parent }) {
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
|
||||
// const load_journal_entry_obj = await load_ae_obj_id({
|
||||
// api_cfg: ae_acct.api,
|
||||
// obj_type: 'journal_entry',
|
||||
// obj_id: journal_entry_id,
|
||||
// db_instance: db_journals,
|
||||
// db_field_li: journal_entry_field_li,
|
||||
// log_lvl: 2
|
||||
// });
|
||||
|
||||
if (!load_journal_entry_obj) {
|
||||
console.warn(
|
||||
`ae Journals [journal_entry_id] +page.ts: Entry ${journal_entry_id} not found via API or Cache.`
|
||||
|
||||
Reference in New Issue
Block a user