aboutsummaryrefslogtreecommitdiff
path: root/services/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'services/index.ts')
-rw-r--r--services/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/index.ts b/services/index.ts
index ce20901..bdce04f 100644
--- a/services/index.ts
+++ b/services/index.ts
@@ -6,6 +6,8 @@ import Votes from './votes/votes.service';
import Auth from './auth/auth.service';
import tryAuthenticate from '../hooks/tryAuthenticate';
+import logging from '../hooks/logging';
+import handleErrors from '../hooks/handleErrors';
export default (app: Application): void => {
app.configure(Auth);
@@ -16,7 +18,10 @@ export default (app: Application): void => {
app.hooks({
before: {
- all: tryAuthenticate
+ all: [tryAuthenticate, logging]
+ },
+ error: {
+ all: handleErrors
}
});
};