misc: addressed type issue and ux improvements

This commit is contained in:
Sheen Capadngan
2025-05-17 13:00:04 +08:00
parent edefa7698c
commit 56b7328231
12 changed files with 161 additions and 136 deletions
@@ -440,7 +440,7 @@ export const pkiSubscriberServiceFactory = ({
const caCertObj = new x509.X509Certificate(decryptedCaCert);
const notBeforeDate = new Date();
const notAfterDate = new Date(new Date().getTime() + ms(subscriber.ttl));
const notAfterDate = new Date(new Date().getTime() + ms(subscriber.ttl ?? "0"));
const caCertNotBeforeDate = new Date(caCertObj.notBefore);
const caCertNotAfterDate = new Date(caCertObj.notAfter);
@@ -12,7 +12,7 @@ export type TCreatePkiSubscriberDTO = {
name: string;
commonName: string;
status: PkiSubscriberStatus;
ttl: string;
ttl?: string;
subjectAlternativeNames: string[];
keyUsages: CertKeyUsage[];
extendedKeyUsages: CertExtendedKeyUsage[];