Refactor FetchCertificates.ts to improve code readability

This commit is contained in:
Simon Larsen 2024-03-04 18:21:35 +00:00
parent 9c9195e4c1
commit b581981815
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE

View File

@ -56,9 +56,9 @@ export default class Jobs {
continue;
}
const key: string = JSONFunctions.parseJSONObject(cert.blob || '{}')[
'privateKeyPem'
] as string;
const key: string = JSONFunctions.parseJSONObject(
cert.blob || '{}'
)['privateKeyPem'] as string;
let crt: string = JSONFunctions.parseJSONObject(
certBlob.blob || '{}'
)['cert'] as string;
@ -70,9 +70,9 @@ export default class Jobs {
) {
crt += ('\n' +
'\n' +
JSONFunctions.parseJSONObject(certBlob.blob || '{}')[
'chain'
]) as string;
JSONFunctions.parseJSONObject(
certBlob.blob || '{}'
)['chain']) as string;
}
// Need to make sure StatusPageCerts dir exists.