refactor: standardize event file actions and apply batch formatting

- Updated 'create_event_file_obj_from_hosted_file_async' to use the modern V3 action endpoint.
- Standardized 'prevent_default' helper names in root Event and Archive components.
- Applied batch formatting (printWidth: 80) across the settings and events modules.
This commit is contained in:
Scott Idem
2026-02-06 16:17:31 -05:00
parent 433862ad00
commit d21e2f8e6f
20 changed files with 846 additions and 453 deletions

View File

@@ -133,11 +133,21 @@ export async function create_event_file_obj_from_hosted_file_async({
log_lvl?: number;
}) {
if (!hosted_file_id) return false;
const endpoint = `/event/file/from_hosted_file/${hosted_file_id}`;
// Use V3 endpoint for creation from hosted file
const endpoint = `/v3/action/event_file/from_hosted_file/${hosted_file_id}`;
const query_params = { ...params };
if (return_obj) query_params['return_obj'] = true;
if (inc_hosted_file) query_params['inc_hosted_file'] = true;
const result = await api.post_object({ api_cfg, endpoint, params: query_params, data, log_lvl });
const result = await api.post_object({
api_cfg,
endpoint,
params: query_params,
data,
log_lvl
});
if (return_obj) return result;
return result?.event_file_id || result?.id || result?.event_file_id_random;
}