getCertificate.ts 382 B

12345678910111213
  1. import * as api from "./base";
  2. import type { CertificateExpansion } from "./expansions";
  3. import type { Certificate } from "./models";
  4. export async function getCertificate(id: number, expand?: CertificateExpansion[], params = {}): Promise<Certificate> {
  5. return await api.get({
  6. url: `/nginx/certificates/${id}`,
  7. params: {
  8. expand: expand?.join(","),
  9. ...params,
  10. },
  11. });
  12. }