Fixed indentation.

This commit is contained in:
Filip Barl
2017-10-17 11:14:39 +02:00
parent 510d6447df
commit dfe4944ec7
7 changed files with 34 additions and 14 deletions

View File

@@ -197,11 +197,12 @@ function getNodesForTopologies(state, dispatch, topologyIds, topologyOptions = m
// fetch sequentially
state.get('topologyUrlsById')
.filter((_, topologyId) => topologyIds.contains(topologyId))
.reduce((sequence, topologyUrl, topologyId) => sequence.then(() => {
const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state);
return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` });
})
.then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))),
.reduce((sequence, topologyUrl, topologyId) => sequence
.then(() => {
const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state);
return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` });
})
.then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))),
Promise.resolve());
}