API lib cleanup, 404 hosts WIP

This commit is contained in:
Jamie Curnow
2025-09-21 17:16:46 +10:00
parent 058f49ceea
commit 54e036276a
76 changed files with 921 additions and 544 deletions

View File

@@ -1,11 +1,13 @@
import * as api from "./base";
import type { CertificateExpansion } from "./expansions";
import type { Certificate } from "./models";
export async function getCertificate(id: number, abortController?: AbortController): Promise<Certificate> {
return await api.get(
{
url: `/nginx/certificates/${id}`,
export async function getCertificate(id: number, expand?: CertificateExpansion[], params = {}): Promise<Certificate> {
return await api.get({
url: `/nginx/certificates/${id}`,
params: {
expand: expand?.join(","),
...params,
},
abortController,
);
});
}