routes/pageRoute.js
// Check if page should be marked as done. If so, update and save page
Check if page should be marked as done. If so, update and save page
Check if page should be marked as done . If so update and save page
function checkPageDone(page) {
  var isDone = _.every(page.differences, function(d) { return d.state != "in_use"; });
  if (isDone) {
    console.log("Marking page as done:", page._id);
    page.state = "done";
    page.saveAsync();
  }
  return isDone;
}
function checkPageDone ( page ) { var isDone = _ . every ( page . differences , function ( d ) { return d . state != "in_use" ; } ) ; if ( isDone ) { console . log ( "Marking page as done:" , page . _id ) ; page . state = "done" ; page . saveAsync ( ) ; } return isDone ; }
Check if page should be marked as done.
Check if page should be marked as done .