eliminado console.log

This commit is contained in:
Dani Herrero 2017-07-06 14:48:05 +02:00
parent 2b7abef98f
commit bbd09b3d36
1 changed files with 9 additions and 10 deletions

View File

@ -12,14 +12,15 @@ module.exports = function(FakeProduction) {
delete filter.page; delete filter.page;
if(filter.where && filter.where.q){ if(filter.where && filter.where.q){
var newFilter = {and: [ var newFilter = {
{ and: [
or: [ {
{agency: {regexp: filter.where.q}}, or: [
{state: {regexp: filter.where.q}} {agency: {regexp: filter.where.q}},
] {state: {regexp: filter.where.q}}
} ]
] }
]
}; };
delete filter.where.q; delete filter.where.q;
@ -36,8 +37,6 @@ module.exports = function(FakeProduction) {
filter.where = newFilter; filter.where = newFilter;
} }
console.log(JSON.stringify(filter));
FakeProduction.connectToService(ctx, "client"); FakeProduction.connectToService(ctx, "client");
this.find(filter, function(err, tickets) { this.find(filter, function(err, tickets) {
FakeProduction.disconnectFromService("client"); FakeProduction.disconnectFromService("client");