From 874b97bc01b691d7a4553c0ffb337bfaa003d1ff Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 24 Apr 2021 20:20:54 +0300 Subject: feat: enable regex search in Contractors --- src/services/contractors.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/contractors.service.ts b/src/services/contractors.service.ts index a5b3f59..1bfc03d 100644 --- a/src/services/contractors.service.ts +++ b/src/services/contractors.service.ts @@ -2,9 +2,9 @@ import { Application } from '@feathersjs/express'; import service from 'feathers-mongoose'; import Model from '../models/contractor/contractor.model'; -const contractors = service({ Model }); +const Contractors = service({ Model, whitelist: ['$options', '$regex'] }); export default (app: Application): void => { - app.use('/contractors', contractors); + app.use('/contractors', Contractors); }; -- cgit v1.2.3