Skip to content

Commit

Permalink
Allow isPaused to be set via Update API
Browse files Browse the repository at this point in the history
This allows the isPaused attribute to be set when calling
POST /checks/:id

Fixes fzaninotto#316
  • Loading branch information
svramusi committed Jun 27, 2015
1 parent eefbf50 commit be92dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Check.methods.getSingleStatForPeriod = function(period, date, callback) {
Check.methods.populateFromDirtyCheck = function(dirtyCheck, pollerCollection) {
this.url = dirtyCheck.url || this.url;
this.maxTime = dirtyCheck.maxTime || this.maxTime;
this.isPaused = dirtyCheck.isPaused || this.isPaused;
this.isPaused = (dirtyCheck.isPaused == undefined) ? this.isPaused : dirtyCheck.isPaused
this.alertTreshold = dirtyCheck.alertTreshold || this.alertTreshold;
this.interval = dirtyCheck.interval * 1000 || this.interval;

Expand Down

0 comments on commit be92dff

Please sign in to comment.