Skip to content

Commit

Permalink
Fix querying through integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Benaiah committed Jun 12, 2018
1 parent 25e0bdd commit 844912f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ export function searchEntries(searchTerm, page = 0) {
// in specific collections and return raw data (no entries).
export function query(namespace, collectionName, searchFields, searchTerm) {
return (dispatch, getState) => {
dispatch(querying(namespace, collection, searchFields, searchTerm));
dispatch(querying(namespace, collectionName, searchFields, searchTerm));

const state = getState();
const backend = currentBackend(state.config);
const integration = selectIntegration(state, collectionName, 'search');
const collection = state.collections.find(collection => collection.get('name') === collectionName);
const integration = selectIntegration(state, collection, 'search');

const queryPromise = integration
? getIntegrationProvider(state.integrations, backend.getToken, integration)
Expand Down

0 comments on commit 844912f

Please sign in to comment.