Migrate Posts and Event Presentations to unified type system
- Integrated ae_Post, ae_PostComment, ae_Page, and ae_Archive types into logic files. - Replaced local interfaces in ae_posts__post.ts and ae_posts__post_comment.ts. - Standardized Promise return types for all CRUD and loading functions in Post and Presentation modules. - Synchronized event presentation logic with V3 triple-ID patterns.
This commit is contained in:
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_posts } from '$lib/ae_posts/db_posts';
|
||||
import type { ae_PostComment } from '$lib/types/ae_types';
|
||||
|
||||
const ae_promises: key_val = {};
|
||||
|
||||
@@ -21,7 +22,7 @@ export async function load_ae_obj_id__post_comment({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_PostComment | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`);
|
||||
}
|
||||
@@ -96,7 +97,7 @@ export async function load_ae_obj_li__post_comment({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_PostComment[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__post_comment() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -156,7 +157,7 @@ export async function create_ae_obj__post_comment({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_PostComment | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__post_comment() *** post_id=${post_id}`);
|
||||
}
|
||||
@@ -240,7 +241,7 @@ export async function update_ae_obj__post_comment({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_PostComment | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** update_ae_obj__post_comment() *** post_comment_id=${post_comment_id}`, data_kv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user