Migrate Bulletin Board (Posts) to V3 and finish IDAA V3 migration
- Migrated Post and Post Comment modules to Aether API CRUD V3 - Added editable_fields for Posts and Post Comments - Implemented local filtering for 'archive_on' in BB route as V3 workaround - Verified IDAA Archives and Recovery Meetings are functional on V3 - Ensured all IDAA logic follows the API -> Processor -> DB Save pattern
This commit is contained in:
@@ -21,9 +21,6 @@ export const load = (async ({ params, parent }) => {
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: account_id,
|
||||
// archive_on should be current datetime in ISO format
|
||||
// Date().toISOString()
|
||||
qry_archive_on: '2024-01-01', // (new Date()).toISOString(),
|
||||
inc_comment_li: true,
|
||||
enabled: 'enabled',
|
||||
hidden: 'not_hidden',
|
||||
@@ -31,6 +28,11 @@ export const load = (async ({ params, parent }) => {
|
||||
order_by_li: { updated_on: 'DESC', created_on: 'DESC' },
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
}).then(posts => {
|
||||
// Workaround: V3 Search does not permit 'archive_on' field yet.
|
||||
// Filter locally for posts that are not archived yet.
|
||||
const now = new Date();
|
||||
return (posts || []).filter((p: any) => !p.archive_on || new Date(p.archive_on) > now);
|
||||
});
|
||||
if (log_lvl) {
|
||||
console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
|
||||
Reference in New Issue
Block a user