Skip to content

Commit

Permalink
Added checkContext to mongoKeys.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyystop committed Feb 3, 2018
1 parent 4da8ae3 commit 7d17382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/services/mongo-keys.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

const traverse = require('traverse');
const { ObjectID } = require('mongodb');
const checkContext = require('./check-context');

module.exports = function mongoKeys (ObjectID, keyFields) {
keyFields = Array.isArray(keyFields) ? keyFields : [keyFields];
Expand Down
2 changes: 1 addition & 1 deletion tests/services/mongo-keys.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ describe('services mongoKeys', () => {
});

function wrapper (keys, query) {
const newContext = mongoKeys(ObjectID, keys)({ params: { query } });
const newContext = mongoKeys(ObjectID, keys)({ params: { query }, type: 'before', method: 'find' });
return newContext.params.query;
}

0 comments on commit 7d17382

Please sign in to comment.