Sha256: 0a93721213705a5253b3e337e14c21040f6291addef2c00a96d0d28b9b021ffe

Contents?: true

Size: 723 Bytes

Versions: 62

Compression:

Stored size: 723 Bytes

Contents

import { initialApiState } from '../../../services/api';
import {
  MODULE_STREAM_DETAILS_REQUEST,
  MODULE_STREAM_DETAILS_SUCCESS,
  MODULE_STREAM_DETAILS_FAILURE,
} from './ModuleStreamDetailsConstants';

export default (state = initialApiState, action) => {
  switch (action.type) {
  case MODULE_STREAM_DETAILS_REQUEST: {
    return state.set('loading', true);
  }

  case MODULE_STREAM_DETAILS_SUCCESS: {
    const moduleStreamDetails = action.response;

    return state.merge({
      ...moduleStreamDetails,
      loading: false,
    });
  }

  case MODULE_STREAM_DETAILS_FAILURE: {
    return state.merge({
      error: action.payload.message,
      loading: false,
    });
  }

  default:
    return state;
  }
};

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.15.0.rc1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.14.1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.14.0 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.14.0.rc3 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.14.0.rc2 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.14.0.rc1.1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.14.0.rc1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.13.1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.13.0 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.12.1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.13.0.rc1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.12.0 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.12.0.rc3 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.12.0.rc2 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.12.0.rc1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.11.1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.11.0 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.11.0.rc2 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js
katello-4.11.0.rc1 webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js