mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-04 17:35:15 +00:00
Custom certificate upload
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
import * as api from "./base";
|
||||
import type { Certificate } from "./models";
|
||||
|
||||
export async function uploadCertificate(
|
||||
id: number,
|
||||
certificate: string,
|
||||
certificateKey: string,
|
||||
intermediateCertificate?: string,
|
||||
): Promise<Certificate> {
|
||||
export async function uploadCertificate(id: number, data: FormData): Promise<Certificate> {
|
||||
return await api.post({
|
||||
url: `/nginx/certificates/${id}/upload`,
|
||||
data: { certificate, certificateKey, intermediateCertificate },
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import * as api from "./base";
|
||||
import type { ValidatedCertificateResponse } from "./responseTypes";
|
||||
|
||||
export async function validateCertificate(
|
||||
certificate: string,
|
||||
certificateKey: string,
|
||||
intermediateCertificate?: string,
|
||||
): Promise<ValidatedCertificateResponse> {
|
||||
export async function validateCertificate(data: FormData): Promise<ValidatedCertificateResponse> {
|
||||
return await api.post({
|
||||
url: "/nginx/certificates/validate",
|
||||
data: { certificate, certificateKey, intermediateCertificate },
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user