src/client/smc/js/services/Stores/Store.js
// Execute a custom action from the ng-resource object
Execute a custom action from the ng-resource object
Execute a custom action from the ng - resource object
function customStoreAction(customMethodName, attributes, next) {
      Configuration.ready().then(function() {
        if (typeof collectionAPI[customMethodName] !== 'function') {
          throw 'Unknown method name';
        }
        collectionAPI[customMethodName](attributes, function(data) {
          if (typeof next === 'function') {
            return next(null, _cleanResponse(data));
          }
        }, function(err) {
          if (typeof next === 'function') {
            return next(err, null);
          }
        });
      })
    }
function customStoreAction ( customMethodName , attributes , next ) { Configuration . ready ( ) . then ( function ( ) { if ( typeof collectionAPI [ customMethodName ] !== 'function' ) { throw 'Unknown method name' ; } collectionAPI [ customMethodName ] ( attributes , function ( data ) { if ( typeof next === 'function' ) { return next ( null , _cleanResponse ( data ) ) ; } } , function ( err ) { if ( typeof next === 'function' ) { return next ( err , null ) ; } } ) ; } ) }
Execute a custom action from the ng-resource object
Execute a custom action from the ng - resource object