From 593159c22c2acad599b67d1b128a52232b79a34b Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 24 Apr 2021 20:34:00 +0300 Subject: feat: add accounts service --- src/services/accounts.service.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/services/accounts.service.ts (limited to 'src/services/accounts.service.ts') diff --git a/src/services/accounts.service.ts b/src/services/accounts.service.ts new file mode 100644 index 0000000..cf22a9b --- /dev/null +++ b/src/services/accounts.service.ts @@ -0,0 +1,10 @@ +import { Application } from '@feathersjs/express'; +import service from 'feathers-mongoose'; +import Model from '../models/account/account.model'; + +const Accounts = service({ Model, whitelist: ['$options', '$regex'] }); + +export default (app: Application): void => { + app.use('/accounts', Accounts); +}; + -- cgit v1.2.3