src/CreateJukebox/Sagas.js
/**
 * @function createJukebox
 *
 * @param {object} action
 * generator for create a jukebox.
 */
@function createJukebox
@param {object} action
generator for create a jukebox.
@function createJukebox @param { object } action generator for create a jukebox .
function* createJukebox(action) {
   try {
      yield call(push, 'jukeboxes', () => (action.jukeboxData), true)
      yield put({type: types.SUCCESS_JUKEBOX_CREATE})
   } catch (error) {
      yield put({type: types.FAILED_CREATE_JUKEBOX, error})
   }
}
function * createJukebox ( action ) { try { yield call ( push , 'jukeboxes' , ( ) => ( action . jukeboxData ) , true ) yield put ( { type : types . SUCCESS_JUKEBOX_CREATE } ) } catch ( error ) { yield put ( { type : types . FAILED_CREATE_JUKEBOX , error } ) } }
@function createJukebox
 @param {object} action
 generator for create a jukebox.
@function createJukebox @param { object } action generator for create a jukebox .
/**
      *
      * @yield call
      * @param (function) push
      * @param (string) 'jukeboxes' firebase DB key
      * @param (function) anonymous function returning the jukeboxData
      * @param (boolean) flag to return the newly created DB Key
      *
      *
      */ /**
       *
       * @yield put
       * @param (object) action type SUCCESS_JUKEBOX_CREATE
       */ /**
       *
       * @yield put
       * @param (object) action type FAILED_CREATE_JUKEBOX
       */