merge updateHistoryGraph behavior into update flag
This commit is contained in:
@ -14,7 +14,7 @@ class ServerRegistration {
|
||||
this._pingHistory = []
|
||||
}
|
||||
|
||||
getUpdate (timestamp, resp, err, version) {
|
||||
getUpdate (timestamp, resp, err, version, updateHistoryGraph) {
|
||||
const update = {
|
||||
serverId: this.serverId,
|
||||
timestamp: timestamp
|
||||
@ -55,6 +55,12 @@ class ServerRegistration {
|
||||
if (this.findNewGraphPeak()) {
|
||||
update.graphPeakData = this.getGraphPeak()
|
||||
}
|
||||
|
||||
// Handled inside logToDatabase to validate logic from #getUpdate call
|
||||
// Only append when true since an undefined value == false
|
||||
if (updateHistoryGraph) {
|
||||
update.updateHistoryGraph = true
|
||||
}
|
||||
}
|
||||
} else if (err) {
|
||||
// Append a filtered copy of err
|
||||
|
Reference in New Issue
Block a user