mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-25 07:45:33 -04:00
Enforce semicolon, fix format globally
This commit is contained in:
parent
6f72ca481f
commit
649f3106e1
50 changed files with 184 additions and 198 deletions
|
@ -534,18 +534,18 @@ class Monitor extends BeanModel {
|
|||
* @returns {Promise<object>}
|
||||
*/
|
||||
async updateTlsInfo(checkCertificateResult) {
|
||||
let tls_info_bean = await R.findOne("monitor_tls_info", "monitor_id = ?", [
|
||||
let tlsInfoBean = await R.findOne("monitor_tls_info", "monitor_id = ?", [
|
||||
this.id,
|
||||
]);
|
||||
|
||||
if (tls_info_bean == null) {
|
||||
tls_info_bean = R.dispense("monitor_tls_info");
|
||||
tls_info_bean.monitor_id = this.id;
|
||||
if (tlsInfoBean == null) {
|
||||
tlsInfoBean = R.dispense("monitor_tls_info");
|
||||
tlsInfoBean.monitor_id = this.id;
|
||||
} else {
|
||||
|
||||
// Clear sent history if the cert changed.
|
||||
try {
|
||||
let oldCertInfo = JSON.parse(tls_info_bean.info_json);
|
||||
let oldCertInfo = JSON.parse(tlsInfoBean.info_json);
|
||||
|
||||
let isValidObjects = oldCertInfo && oldCertInfo.certInfo && checkCertificateResult && checkCertificateResult.certInfo;
|
||||
|
||||
|
@ -567,8 +567,8 @@ class Monitor extends BeanModel {
|
|||
|
||||
}
|
||||
|
||||
tls_info_bean.info_json = JSON.stringify(checkCertificateResult);
|
||||
await R.store(tls_info_bean);
|
||||
tlsInfoBean.info_json = JSON.stringify(checkCertificateResult);
|
||||
await R.store(tlsInfoBean);
|
||||
|
||||
return checkCertificateResult;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue