Fixes for the reports. General clean up all around. Better usage of log_lvl.
This commit is contained in:
@@ -284,6 +284,7 @@ export async function handle_search__event_file(
|
||||
like_search_qry_str = null,
|
||||
like_presentation_search_qry_str = null,
|
||||
like_file_search_qry_str = null,
|
||||
order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'filename': 'ASC', 'extension': 'ASC', 'hosted_file_size': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||
params = {},
|
||||
try_cache = true,
|
||||
log_lvl = 0
|
||||
@@ -296,12 +297,15 @@ export async function handle_search__event_file(
|
||||
like_search_qry_str?: null|string,
|
||||
like_presentation_search_qry_str?: null|string,
|
||||
like_file_search_qry_str?: null|string,
|
||||
order_by_li?: key_val,
|
||||
params?: any,
|
||||
try_cache?: boolean,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_search__event_file() *** event_id=${event_id}`);
|
||||
if (log_lvl) {
|
||||
console.log(`*** handle_search__event_file() *** event_id=${event_id}`);
|
||||
}
|
||||
|
||||
let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled
|
||||
let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden
|
||||
@@ -357,8 +361,6 @@ export async function handle_search__event_file(
|
||||
// params_json['and_qry']['created_on'] = created_on;
|
||||
// }
|
||||
|
||||
let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'filename': 'ASC', 'extension': 'ASC', 'hosted_file_size': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'};
|
||||
|
||||
ae_promises.load__event_file_obj_li = await api.get_ae_obj_li_for_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_file',
|
||||
@@ -400,17 +402,23 @@ export async function handle_search__event_file(
|
||||
export function handle_db_save_ae_obj_li__event_file(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
obj_li,
|
||||
log_lvl=0
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
obj_li: any,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__event_file() ***`);
|
||||
if (log_lvl) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__event_file() ***`);
|
||||
}
|
||||
|
||||
if (obj_li && obj_li.length) {
|
||||
obj_li.forEach(async function (obj: any) {
|
||||
console.log(`ae_obj ${obj_type}:`, obj);
|
||||
if (log_lvl) {
|
||||
console.log(`ae_obj ${obj_type}:`, obj);
|
||||
}
|
||||
|
||||
try {
|
||||
const id_random = await db_events.files.put({
|
||||
|
||||
Reference in New Issue
Block a user