move v1 controllers to v1 dir

This commit is contained in:
Alex Holliday committed 2025-09-22 13:04:45 -07:00
1 parent f767125acd
commit 23126a92cd
16 files changed
+24 -24

No files matched your search

+12
View File
@@ -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 };