summaryrefslogtreecommitdiffstats
path: root/src/app/contextHandler/ContextHandlerActions.js
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2019-02-18 21:40:05 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-18 21:40:05 +0000
commit065e94106723897e590b81b207bf79ed018f079b (patch)
tree5e5aaefa1dd8fb13ca4b3ee219ec581af41a8264 /src/app/contextHandler/ContextHandlerActions.js
parent27fd1057ae501585c447860dc2b640259a7a0eff (diff)
parent27fe29a076553c26e2c56dccaf52d2af789eae3a (diff)
Merge "Integration tests for MainScreenWrapperReducer"
Diffstat (limited to 'src/app/contextHandler/ContextHandlerActions.js')
-rw-r--r--src/app/contextHandler/ContextHandlerActions.js22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/app/contextHandler/ContextHandlerActions.js b/src/app/contextHandler/ContextHandlerActions.js
index f3ede6d..35091b5 100644
--- a/src/app/contextHandler/ContextHandlerActions.js
+++ b/src/app/contextHandler/ContextHandlerActions.js
@@ -81,8 +81,7 @@ function createSubscriptionPayloadEvent(payload) {
}
function fetchSubscriptionPayload(fetchRequestCallback) {
- return dispatch => {
- return fetchRequestCallback().then(
+ return dispatch => fetchRequestCallback().then(
(response) => {
if (response.status >= STATUS_CODE_3XX_REDIRECTION) {
return Promise.reject(new Error(response.status));
@@ -100,16 +99,13 @@ function fetchSubscriptionPayload(fetchRequestCallback) {
dispatch(getSetGlobalMessageEvent(SUBSCRIPTION_FAILED_MESSAGE , MESSAGE_LEVEL_WARNING));
}
);
- };
}
export function getSubscriptionPayload() {
let externalfetchRequest =
() => networkCall.getRequest(SUBSCRIPTION_PAYLOAD_URL, GET);
- return dispatch => {
- dispatch(fetchSubscriptionPayload(externalfetchRequest));
- };
+ return dispatch => dispatch(fetchSubscriptionPayload(externalfetchRequest));
}
function validateExternalParams(externalURLParams) {
@@ -129,8 +125,8 @@ function createSuggestionFoundEvent(suggestion) {
function fetchDataForExternalRequest(fetchRequestCallback) {
- return dispatch => {
- return fetchRequestCallback().then(
+ return dispatch =>
+ fetchRequestCallback().then(
(response) => {
if (response.status === STATUS_CODE_204_NO_CONTENT || response.status >= STATUS_CODE_3XX_REDIRECTION) {
return Promise.reject(new Error(response.status));
@@ -158,7 +154,6 @@ function fetchDataForExternalRequest(fetchRequestCallback) {
dispatch(getSetGlobalMessageEvent(FAILED_REQUEST , MESSAGE_LEVEL_DANGER));
}
);
- };
}
function validateAndFetchExternalParams(externalParams) {
@@ -172,17 +167,12 @@ function validateAndFetchExternalParams(externalParams) {
let externalfetchRequest =
() => networkCall.fetchRequestObj(EXTERNAL_REQ_ENTITY_SEARCH_URL, POST,
POST_HEADER, postBody);
- return dispatch => {
- dispatch(fetchDataForExternalRequest(externalfetchRequest));
- };
+ return dispatch => dispatch(fetchDataForExternalRequest(externalfetchRequest));
}
}
export function externalUrlRequest(urlParams) {
let externalURLParams = getExternalParamValues(urlParams);
- return dispatch => {
- dispatch(
- validateAndFetchExternalParams(externalURLParams));
- };
+ return dispatch => dispatch(validateAndFetchExternalParams(externalURLParams));
}
export function externalMessageRequest(jsonParams) {
return dispatch => {