mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-23 18:19:51 -06:00
Add check for monitor type to abort certificate check if not http type
This commit is contained in:
@@ -142,6 +142,9 @@ const DetailsPage = ({ isAdmin }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const fetchCertificate = async () => {
|
||||
if (monitor?.type !== "http") {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await networkService.getCertificateExpiry(
|
||||
authToken,
|
||||
@@ -153,7 +156,7 @@ const DetailsPage = ({ isAdmin }) => {
|
||||
}
|
||||
};
|
||||
fetchCertificate();
|
||||
}, [authToken, monitorId]);
|
||||
}, [authToken, monitorId, monitor]);
|
||||
|
||||
const theme = useTheme();
|
||||
let loading = Object.keys(monitor).length === 0;
|
||||
|
||||
Reference in New Issue
Block a user