chore(core): remove retired site_domain helper and update docs

This commit is contained in:
Scott Idem
2026-06-02 14:34:19 -04:00
parent 87084f0f71
commit 84a9d0fffc
4 changed files with 14 additions and 87 deletions

View File

@@ -1,75 +0,0 @@
export interface Site_Domain {
id: string;
// id_random: string;
site_id: string;
site_id_random?: string;
fqdn: string;
access_key?: null | string;
required_referrer?: null | string;
valid_for?: null | number; // In hours
enable: null | boolean;
hide?: null | boolean;
priority?: null | boolean;
sort?: null | number;
group?: null | string;
notes?: null | string;
created_on: Date;
updated_on?: null | Date;
}
import { api } from '$lib/api/api';
/**
* Fetches a site_domain object by its Fully Qualified Domain Name (FQDN).
*
* @param api_cfg - The API configuration object.
* @param fqdn - The FQDN of the site domain to fetch.
* @param timeout - The request timeout in milliseconds.
* @param log_lvl - The logging level.
* @returns The site domain object or null if not found.
*/
export async function load_ae_obj_by_fqdn__site_domain({
api_cfg,
fqdn,
timeout = 7000,
log_lvl = 0
}: {
api_cfg: any;
fqdn: string;
timeout?: number;
log_lvl?: number;
}): Promise<any> {
if (log_lvl) {
console.log(
`*** load_ae_obj_by_fqdn__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}`
);
}
const params = {};
try {
const site_domain_obj = await api.get_ae_obj_id_crud({
api_cfg: api_cfg,
no_account_id: true, // This seems to be a special case for this endpoint
obj_type: 'site_domain',
obj_id: fqdn, // NOTE: This is the FQDN, not the ID.
use_alt_table: true,
use_alt_base: true,
params: params,
timeout: timeout,
log_lvl: log_lvl
});
if (site_domain_obj) {
return site_domain_obj;
} else {
console.log('No results returned.');
return null;
}
} catch (error) {
console.log('No results returned or failed.', error);
return null;
}
}

View File

@@ -28,7 +28,7 @@ The Aether system is built on a foundation of several core modules. The UI compo
### Sites & Site Domains
- **Description:** Manages different sites or instances of the application and their associated domain names. This allows for multi-tenant configurations.
- **Logic:** `src/lib/ae_core/core__site.ts` and `core__site_domain.ts`
- **Logic:** `src/lib/ae_core/core__site.ts`
### Users