More code clean up

This commit is contained in:
Scott Idem
2026-03-24 10:54:40 -04:00
parent 8e61bd0ba1
commit 42358efe7d
43 changed files with 228 additions and 228 deletions

View File

@@ -5,10 +5,10 @@ import type { key_val } from '$lib/stores/ae_stores';
* Get a list of lookup objects (V3)
* Standardized lookup data like countries, timezones, and subdivisions.
* Updated 2026-02-20
*
*
* Endpoint: GET /v3/lookup/{lu_type}/list
*/
export async function get_ae_lookup_li_v3({
export async function get_ae_lookup_li({
api_cfg,
lu_type,
site_id,
@@ -38,11 +38,11 @@ export async function get_ae_lookup_li_v3({
log_lvl?: number;
}) {
if (log_lvl) {
console.log(`*** get_ae_lookup_li_v3() *** lu_type=${lu_type}`);
console.log(`*** get_ae_lookup_li() *** lu_type=${lu_type}`);
}
const endpoint = `/v3/lookup/${lu_type}/list`;
// Build query params
if (site_id) params['site_id'] = site_id;
if (for_type) params['for_type'] = for_type;
@@ -53,11 +53,11 @@ export async function get_ae_lookup_li_v3({
if (limit != null) params['limit'] = limit;
if (offset != null) params['offset'] = offset;
// Lookup data is often global; ensure account context is handled if needed,
// Lookup data is often global; ensure account context is handled if needed,
// but GUIDE says it uses site Whitelist Policy.
// If no account_id is present in api_cfg, we might need 'x-no-account-id'
// If no account_id is present in api_cfg, we might need 'x-no-account-id'
// for some lookups if they are public.
return await get_object({
api_cfg,
endpoint,