Added http type check and tags based design

This commit is contained in:
Tarun Singh
2023-07-17 02:01:10 -04:00
parent 2e75142fe5
commit f6c1b92fc6
2 changed files with 20 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ class Monitor extends BeanModel {
id: this.id,
name: this.name,
sendUrl: this.sendUrl,
type: this.type,
};
if (this.sendUrl) {
@@ -52,7 +53,7 @@ class Monitor extends BeanModel {
obj.tags = await this.getTags();
}
if (certExpiry) {
if (certExpiry && this.type === "http") {
const { certExpiryDaysRemaining, validCert } = await this.getCertExpiry(this.id);
obj.certExpiryDaysRemaining = certExpiryDaysRemaining;
obj.validCert = validCert;