function askNewVersion(filter, respCallbacks) {
  var state = store.getState();

  var url = help.joinUrl(state.baseUrl, 'api/app/new_version/' + filter);

  request.get({
      url : url,
      timeout : 2000,
      headers : {
        'App-Token' : state.appToken
      }
    },
    function (err, res, body) {
      if(err) console.log(err);

      if(res.statusCode == 200) {
        return respCallbacks.success();
      }

      return respCallbacks.error();
    }
  );
}
/**
 * GET ask for new version (removes old entries on the server)
 * @param {String} filter
 * @param {Object} respCallbacks success and error callbacks
 */
GET ask for new version (removes old entries on the server)
@param {String} filter
@param {Object} respCallbacks success and error callbacks
GET ask for new version ( removes old entries on the server ) @param { String } filter @param { Object } respCallbacks success and error callbacks
function askNewVersion(filter, respCallbacks) {
  var state = store.getState();
  var url = help.joinUrl(state.baseUrl, 'api/app/new_version/' + filter);
  request.get({
      url : url,
      timeout : 2000,
      headers : {
        'App-Token' : state.appToken
      }
    },
    function (err, res, body) {
      if(err) console.log(err);
      if(res.statusCode == 200) {
        return respCallbacks.success();
      }
      return respCallbacks.error();
    }
  );
}
function askNewVersion ( filter , respCallbacks ) { var state = store . getState ( ) ; var url = help . joinUrl ( state . baseUrl , 'api/app/new_version/' + filter ) ; request . get ( { url : url , timeout : 2000 , headers : { 'App-Token' : state . appToken } } , function ( err , res , body ) { if ( err ) console . log ( err ) ; if ( res . statusCode == 200 ) { return respCallbacks . success ( ) ; } return respCallbacks . error ( ) ; } ) ; }
GET ask for new version (removes old entries on the server)
 @param {String} filter
 @param {Object} respCallbacks success and error callbacks
GET ask for new version ( removes old entries on the server ) @param { String } filter @param { Object } respCallbacks success and error callbacks