Improvements on how posts are pulled in and sorted.

This commit is contained in:
Scott Idem
2025-07-18 18:15:18 -04:00
parent fd69610a3a
commit 0ac7bea046
5 changed files with 82 additions and 32 deletions

View File

@@ -7,7 +7,7 @@ import { browser } from '$app/environment';
import { posts_func } from '$lib/ae_posts/ae_posts_functions';
export const load = (async ({ params, parent }) => { // route
let log_lvl: number = 0;
let log_lvl: number = 1;
let data = await parent();
data.log_lvl = log_lvl;
@@ -20,11 +20,14 @@ export const load = (async ({ params, parent }) => { // route
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',
limit: 29,
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'},
limit: 19,
order_by_li: {'updated_on': 'DESC', 'created_on': 'DESC'},
try_cache: true,
log_lvl: log_lvl
});