CAU 2593 Busqueda Avanzada - campo telefono busca en: phone or mobile

This commit is contained in:
Dani Herrero 2017-07-11 11:18:42 +02:00
parent e22e9c7f13
commit 4e087139b4
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,10 @@ module.exports = function(Client){
city: {regexp: p.city},
postcode: p.postcode,
email: {regexp: p.email},
phone: p.phone
or: [
{phone: p.phone},
{mobile: p.phone}
]
},
skip: (p.page - 1) * p.size,
limit: p.size