Last round of prettier: npx prettier --write src/
This commit is contained in:
@@ -191,7 +191,9 @@ async function _refresh_file_li_background({
|
||||
if (typeof navigator !== 'undefined' && !navigator.onLine) return [];
|
||||
try {
|
||||
if (log_lvl) {
|
||||
console.log(`📡 [DEBUG] _refresh_file_li_background: Fetching files for ${for_obj_type}:${for_obj_id}`);
|
||||
console.log(
|
||||
`📡 [DEBUG] _refresh_file_li_background: Fetching files for ${for_obj_type}:${for_obj_id}`
|
||||
);
|
||||
}
|
||||
|
||||
const result_li = await api.get_ae_obj_li({
|
||||
@@ -211,7 +213,10 @@ async function _refresh_file_li_background({
|
||||
|
||||
if (result_li) {
|
||||
if (log_lvl) {
|
||||
console.log(`📦 [DEBUG] Raw API results count:`, result_li.length);
|
||||
console.log(
|
||||
`📦 [DEBUG] Raw API results count:`,
|
||||
result_li.length
|
||||
);
|
||||
if (result_li.length > 0) {
|
||||
console.log(`🔍 [DEBUG] Sample Raw IDs:`, {
|
||||
id: result_li[0].id,
|
||||
@@ -253,7 +258,10 @@ async function _refresh_file_li_background({
|
||||
}
|
||||
|
||||
if (try_cache) {
|
||||
if (log_lvl) console.log(`💾 [DEBUG] Saving ${processed.length} records to ae_events_db.file`);
|
||||
if (log_lvl)
|
||||
console.log(
|
||||
`💾 [DEBUG] Saving ${processed.length} records to ae_events_db.file`
|
||||
);
|
||||
await db_save_ae_obj_li__ae_obj({
|
||||
db_instance: db_events,
|
||||
table_name: 'file',
|
||||
@@ -265,10 +273,15 @@ async function _refresh_file_li_background({
|
||||
return processed;
|
||||
}
|
||||
} catch (e) {
|
||||
if (log_lvl) console.error(`❌ [DEBUG] Error in _refresh_file_li_background:`, e);
|
||||
if (log_lvl)
|
||||
console.error(
|
||||
`❌ [DEBUG] Error in _refresh_file_li_background:`,
|
||||
e
|
||||
);
|
||||
}
|
||||
return [];
|
||||
}export async function create_event_file_obj_from_hosted_file_async({
|
||||
}
|
||||
export async function create_event_file_obj_from_hosted_file_async({
|
||||
api_cfg,
|
||||
hosted_file_id,
|
||||
params = {},
|
||||
@@ -459,7 +472,7 @@ export async function search__event_file({
|
||||
});
|
||||
}
|
||||
|
||||
return processed; // Return processed data with mapped fields
|
||||
return processed; // Return processed data with mapped fields
|
||||
}
|
||||
|
||||
return [];
|
||||
@@ -545,7 +558,11 @@ async function _process_generic_props<T extends Record<string, any>>({
|
||||
if (key.endsWith('_random')) {
|
||||
const newKey = key.slice(0, -7);
|
||||
// ONLY overwrite if the random variant has a valid value
|
||||
if (processed_obj[key] !== null && processed_obj[key] !== undefined && processed_obj[key] !== '') {
|
||||
if (
|
||||
processed_obj[key] !== null &&
|
||||
processed_obj[key] !== undefined &&
|
||||
processed_obj[key] !== ''
|
||||
) {
|
||||
(processed_obj as any)[newKey] = processed_obj[key];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user