From c346ea786486d4cd3e2f9abeef2d00f7307e2d60 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Fri, 13 May 2022 08:57:06 -0500 Subject: [PATCH] updated name on export --- server/model/monitor.js | 4 ++-- server/util-server.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index f17d10047..be6de374d 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -7,7 +7,7 @@ dayjs.extend(timezone); const axios = require("axios"); const { Prometheus } = require("../prometheus"); const { log, UP, DOWN, PENDING, flipStatus, TimeLogger } = require("../../src/util"); -const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, sqlserver, mqttAsync } = require("../util-server"); +const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, mssqlQuery, mqttAsync } = require("../util-server"); const { R } = require("redbean-node"); const { BeanModel } = require("redbean-node/dist/bean-model"); const { Notification } = require("../notification"); @@ -440,7 +440,7 @@ class Monitor extends BeanModel { } else if (this.type === "sqlserver") { let startTime = dayjs().valueOf(); - await sqlserver(this.databaseConnectionString, this.databaseQuery); + await mssqlQuery(this.databaseConnectionString, this.databaseQuery); bean.msg = ""; bean.status = UP; diff --git a/server/util-server.js b/server/util-server.js index ea5cdd9d7..0b3fce15b 100644 --- a/server/util-server.js +++ b/server/util-server.js @@ -210,7 +210,7 @@ exports.dnsResolve = function (hostname, resolverServer, rrtype) { * @param {string} query The query to validate the database with * @returns {Promise<(string[]|Object[]|Object)>} */ -exports.sqlserver = function (connectionString, query) { +exports.mssqlQuery = function (connectionString, query) { return new Promise((resolve, reject) => { mssql.on("error", err => { reject(err);