mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 03:27:38 +00:00
Fix type errors
This commit is contained in:
@@ -267,7 +267,12 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
expiresAt: Date;
|
expiresAt: Date;
|
||||||
notBefore?: Date | null;
|
notBefore?: Date | null;
|
||||||
notAfter?: Date | null;
|
notAfter?: Date | null;
|
||||||
authorizations: TPkiAcmeAuths[];
|
authorizations: {
|
||||||
|
id: string;
|
||||||
|
identifierType: string;
|
||||||
|
identifierValue: string;
|
||||||
|
expiresAt: Date;
|
||||||
|
}[];
|
||||||
};
|
};
|
||||||
profileId: string;
|
profileId: string;
|
||||||
}): TAcmeOrderResource => {
|
}): TAcmeOrderResource => {
|
||||||
@@ -276,13 +281,11 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
expires: order.expiresAt.toISOString(),
|
expires: order.expiresAt.toISOString(),
|
||||||
notBefore: order.notBefore?.toISOString(),
|
notBefore: order.notBefore?.toISOString(),
|
||||||
notAfter: order.notAfter?.toISOString(),
|
notAfter: order.notAfter?.toISOString(),
|
||||||
identifiers: order.authorizations.map((auth: TPkiAcmeAuths) => ({
|
identifiers: order.authorizations.map((auth) => ({
|
||||||
type: auth.identifierType,
|
type: auth.identifierType,
|
||||||
value: auth.identifierValue
|
value: auth.identifierValue
|
||||||
})),
|
})),
|
||||||
authorizations: order.authorizations.map((auth: TPkiAcmeAuths) =>
|
authorizations: order.authorizations.map((auth) => buildUrl(profileId, `/authorizations/${auth.id}`)),
|
||||||
buildUrl(profileId, `/authorizations/${auth.id}`)
|
|
||||||
),
|
|
||||||
finalize: buildUrl(profileId, `/orders/${order.id}/finalize`),
|
finalize: buildUrl(profileId, `/orders/${order.id}/finalize`),
|
||||||
certificate:
|
certificate:
|
||||||
order.status === AcmeOrderStatus.Valid ? buildUrl(profileId, `/orders/${order.id}/certificate`) : undefined
|
order.status === AcmeOrderStatus.Valid ? buildUrl(profileId, `/orders/${order.id}/certificate`) : undefined
|
||||||
@@ -630,7 +633,7 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
},
|
},
|
||||||
tx
|
tx
|
||||||
);
|
);
|
||||||
// TODO: log the error
|
logger.error(error, "Failed to sign certificate");
|
||||||
// TODO: audit log the error
|
// TODO: audit log the error
|
||||||
if (error instanceof BadRequestError) {
|
if (error instanceof BadRequestError) {
|
||||||
errorToReturn = new AcmeBadCSRError({ detail: `Invalid CSR: ${error.message}` });
|
errorToReturn = new AcmeBadCSRError({ detail: `Invalid CSR: ${error.message}` });
|
||||||
|
|||||||
Reference in New Issue
Block a user