From ed0133e51845d4fd08d539304403abcda56b144e Mon Sep 17 00:00:00 2001 From: Martin Broerse Date: Wed, 13 Sep 2017 20:54:04 +0200 Subject: [PATCH] Revert "filter results of pouch adapter query by correct type" --- addon/adapters/pouch.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/addon/adapters/pouch.js b/addon/adapters/pouch.js index 2a34af6..a33c906 100644 --- a/addon/adapters/pouch.js +++ b/addon/adapters/pouch.js @@ -359,15 +359,7 @@ export default DS.RESTAdapter.extend({ queryParams.sort = this._buildSort(query.sort); } - var idType = type.documentType || recordTypeName; - var recordTypeNameRegex = new RegExp('^' + idType + '_[0-3]'); - - return db.find(queryParams) - .then(function({ docs }) { - let matchinDocs = docs.filter(({ _id }) => _id.match(recordTypeNameRegex)); - return { docs: matchinDocs }; - }) - .then(pouchRes => db.rel.parseRelDocs(recordTypeName, pouchRes.docs)); + return db.find(queryParams).then(pouchRes => db.rel.parseRelDocs(recordTypeName, pouchRes.docs)); }, queryRecord: function(store, type, query) {