1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-24 22:14:47 +02:00

Refactor line for conciseness

This commit is contained in:
Matt Visnovsky 2024-06-05 15:39:55 -06:00
parent 7eee5db4d2
commit b2d76bc60a

View File

@ -29,11 +29,7 @@ class SNMPMonitorType extends MonitorType {
const varbinds = await new Promise((resolve, reject) => {
session.get([ monitor.snmpOid ], (error, varbinds) => {
if (error) {
reject(error);
} else {
resolve(varbinds);
}
error ? reject(error) : resolve(varbinds);
});
});
log.debug("monitor", `SNMP: Received varbinds (Type: ${snmp.ObjectType[varbinds[0].type]} Value: ${varbinds[0].value}`);