Finally really starting to move things to v2 of the CRUD API.

This commit is contained in:
Scott Idem
2024-11-20 15:11:57 -05:00
parent fd602a46ac
commit 6b60c14159
9 changed files with 180 additions and 139 deletions

View File

@@ -23,7 +23,9 @@ export async function load_ae_obj_id__archive_content(
log_lvl?: number
}
) {
console.log(`*** load_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}`);
if (log_lvl) {
console.log(`*** load_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}`);
}
let params = {};
@@ -60,7 +62,7 @@ export async function load_ae_obj_id__archive_content(
}
// Updated 2024-09-25
// Updated 2024-11-20
export async function load_ae_obj_li__archive_content(
{
api_cfg,
@@ -88,7 +90,9 @@ export async function load_ae_obj_li__archive_content(
log_lvl?: number
}
) {
console.log(`*** load_ae_obj_li__archive_content() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`);
if (log_lvl) {
console.log(`*** load_ae_obj_li__archive_content() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`);
}
// let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled
// let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden
@@ -99,13 +103,14 @@ export async function load_ae_obj_li__archive_content(
// console('params_json:', params_json);
ae_promises.load__archive_content_obj_li = await api.get_ae_obj_li_for_obj_id_crud({
ae_promises.load__archive_content_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({
api_cfg: api_cfg,
obj_type: 'archive_content',
for_obj_type: for_obj_type,
for_obj_id: for_obj_id,
use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config.
use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value
use_alt_tbl: false,
use_alt_mdl: false,
use_alt_exp: false,
enabled: enabled,
hidden: hidden,
order_by_li: order_by_li,