fix: resolve TypeErrors in core, events, and journals modules
- Core: Use FormData in video clip components to fix EventTarget errors. - DB: Rename 'File' to 'ae_LocalFile' in db_core to prevent DOM type shadowing. - API: Strictly type 'order_by_li' across archives, events, and journals to match API definition. - API: Fix 'enabled'/'hidden' parameter types in search functions. - Generics: Add 'any' cast to 'processed_obj' in generic processors to fix indexing errors. - Journals: Update journal_entry creation to return null on failure, fix missing ID fields in DB save.
This commit is contained in:
@@ -202,7 +202,7 @@ export async function create_ae_obj__journal_entry({
|
||||
|
||||
if (!journal_id) {
|
||||
console.log(`ERROR: Journals - Entry - journal_id required to create`);
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
ae_promises.create__journal_entry = await api
|
||||
@@ -601,8 +601,10 @@ export async function db_save_ae_obj_li__journal_entry({
|
||||
const obj_record = {
|
||||
id: obj.journal_entry_id_random,
|
||||
journal_entry_id: obj.journal_entry_id_random,
|
||||
journal_entry_id_random: obj.journal_entry_id_random,
|
||||
|
||||
journal_id: obj.journal_id_random,
|
||||
journal_id_random: obj.journal_id_random,
|
||||
|
||||
code: obj.code,
|
||||
|
||||
@@ -633,14 +635,14 @@ export async function db_save_ae_obj_li__journal_entry({
|
||||
// description: obj.description,
|
||||
|
||||
content: obj.content,
|
||||
content_md_html: content_md_html,
|
||||
content_md_html: content_md_html ?? undefined,
|
||||
// content_md_html_alt: content_md_html_alt,
|
||||
content_html: obj.content_html,
|
||||
content_json: obj.content_json,
|
||||
content_encrypted: obj.content_encrypted,
|
||||
|
||||
history: obj.history,
|
||||
history_md_html: history_md_html,
|
||||
history_md_html: history_md_html ?? undefined,
|
||||
history_encrypted: obj.history_encrypted,
|
||||
|
||||
passcode_hash: obj.passcode_hash,
|
||||
|
||||
Reference in New Issue
Block a user