blob: 499ab68086cac2de265fbec8f8123c9f0aa1ffb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { Application } from '@feathersjs/express';
import Accounts from './accounts.service';
import Products from './products.service';
import Contractors from './contractors.service';
import Waybills from './waybills.service';
import Tranfers from './transfers.service';
import Spreadsheets from './spreadsheets.service';
import Uploads from './uploads.service';
import sortByDate from '../hooks/sortByDate';
import ignoreCaseRegex from '../hooks/ignoreCaseRegex';
export default (app: Application): void => {
app.configure(Accounts);
app.configure(Products);
app.configure(Contractors);
app.configure(Waybills);
app.configure(Tranfers);
app.configure(Spreadsheets);
app.configure(Uploads);
app.get('/ping', (req, res) => res.send('pong'));
app.hooks({
before: {
find: [sortByDate, ignoreCaseRegex]
},
})
};
|