src/client/smc/js/services/Stores/Store.js
// Pull the data from the remote server and store it into the local cache
Pull the data from the remote server and store it into the local cache
Pull the data from the remote server and store it into the local cache
function pullStoreAction(next) {
      Configuration.ready().then(function() {
        collectionAPI[options.pullRouteName]({}, function(data) {
          _cache.date = new Date();
          _cache.data = _cleanResponse(data);
          if (typeof next === 'function') {
            return next(null, _cache.data);
          }
        }, function(err) {
          console.error('Store::pull', err);
          if (typeof next === 'function') {
            return next(err, null);
          }
        });
      });
    }
function pullStoreAction ( next ) { Configuration . ready ( ) . then ( function ( ) { collectionAPI [ options . pullRouteName ] ( { } , function ( data ) { _cache . date = new Date ( ) ; _cache . data = _cleanResponse ( data ) ; if ( typeof next === 'function' ) { return next ( null , _cache . data ) ; } } , function ( err ) { console . error ( 'Store::pull' , err ) ; if ( typeof next === 'function' ) { return next ( err , null ) ; } } ) ; } ) ; }
Pull the data from the remote server and store it into the local cache
Pull the data from the remote server and store it into the local cache