cloudfoundry-incubator/stratos

View on GitHub
src/frontend/packages/store/src/entity-request-pipeline/entity-request-base-handlers/start-entity-request.handler.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { StartRequestAction } from '../../types/request.types';
import { StartEntityRequestHandler } from '../entity-request-pipeline.types';

export const startEntityHandler: StartEntityRequestHandler = (
  actionDispatcher,
  catalogEntity,
  requestType,
  action
) => {
  const entityAction = catalogEntity.getRequestAction('start', action, requestType);
  actionDispatcher(new StartRequestAction(action, requestType));
  actionDispatcher(entityAction);
};