X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=otf-frontend%2Fserver%2Fsrc%2Ffeathers%2Fapp.hooks.js;fp=otf-frontend%2Fserver%2Fsrc%2Ffeathers%2Fapp.hooks.js;h=159ff94073e89fe6e01b1ab67a14ef1672419ff1;hb=cf067bb8bd9b45e79a85e9612a0f4c5abeb727b8;hp=4cd08ac2b4ee974d0f29f705ca23e9cfbf6ceeab;hpb=596b1d89c5f63170ed40abb6f7b9395178c5e44e;p=it%2Fotf.git diff --git a/otf-frontend/server/src/feathers/app.hooks.js b/otf-frontend/server/src/feathers/app.hooks.js index 4cd08ac..159ff94 100644 --- a/otf-frontend/server/src/feathers/app.hooks.js +++ b/otf-frontend/server/src/feathers/app.hooks.js @@ -21,10 +21,11 @@ const createdBy = require('./hooks/createdBy'); const updatedBy = require('./hooks/updatedBy'); const {iff, disallow, isProvider, skipRemainingHooks} = require('feathers-hooks-common'); const { ObjectID } = require('mongodb'); +const shardKey = require('./hooks/insertShardKey.js'); module.exports = { before: { - all: [paginateOption(), skipRemainingHooks(context => !context.params.provider)], + all: [shardKey(), paginateOption(), skipRemainingHooks(context => !context.params.provider)], find: [ function(context){ const {query} = context.params;