aboutsummaryrefslogtreecommitdiff
path: root/services/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'services/index.ts')
-rw-r--r--services/index.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/index.ts b/services/index.ts
index f000837..fe5ffdc 100644
--- a/services/index.ts
+++ b/services/index.ts
@@ -2,12 +2,22 @@ import { Application } from '@feathersjs/express';
import Users from './users/users.service';
import Polls from './polls/polls.service';
import Profiles from './profiles/profiles.service';
+import Votes from './votes/votes.service';
import Auth from './auth/auth.service';
+import tryAuthenticate from '../hooks/tryAuthenticate';
+
export default (app: Application): void => {
app.configure(Auth);
app.configure(Users);
app.configure(Polls);
app.configure(Profiles);
+ app.configure(Votes);
+
+ app.hooks({
+ before: {
+ all: tryAuthenticate
+ }
+ })
};