move v1 controllers to v1 dir
This commit is contained in:
1 parent
f767125acd
commit
23126a92cd
16 files changed
+24
-24
No files matched your search
Executable
+12
@@ -0,0 +1,12 @@
|
||||
const fetchMonitorCertificate = async (sslChecker, monitor) => {
|
||||
const monitorUrl = new URL(monitor.url);
|
||||
const hostname = monitorUrl.hostname;
|
||||
const cert = await sslChecker(hostname);
|
||||
// Throw an error if no cert or if cert.validTo is not present
|
||||
if (cert?.validTo === null || cert?.validTo === undefined) {
|
||||
throw new Error("Certificate not found");
|
||||
}
|
||||
return cert;
|
||||
};
|
||||
|
||||
export { fetchMonitorCertificate };
|
||||
Reference in new issue
Block a user