aboutsummaryrefslogtreecommitdiff
path: root/services/index.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-25 19:41:42 +0300
committereug-vs <eug-vs@keemail.me>2020-06-25 19:41:42 +0300
commit57d96831358a6df5dd4f92a1d33715cbc3a575e0 (patch)
tree5799a6d9eb60aa870c49337edcd9aa82473979fc /services/index.ts
parent343a975413d8d3ce8194507017fb4ca01a4faf54 (diff)
downloadwhich-api-57d96831358a6df5dd4f92a1d33715cbc3a575e0.tar.gz
feat: enable logging hook for external requests
Diffstat (limited to 'services/index.ts')
-rw-r--r--services/index.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/index.ts b/services/index.ts
index ce20901..8d77429 100644
--- a/services/index.ts
+++ b/services/index.ts
@@ -6,6 +6,7 @@ import Votes from './votes/votes.service';
import Auth from './auth/auth.service';
import tryAuthenticate from '../hooks/tryAuthenticate';
+import logging from '../hooks/logging';
export default (app: Application): void => {
app.configure(Auth);
@@ -17,6 +18,9 @@ export default (app: Application): void => {
app.hooks({
before: {
all: tryAuthenticate
+ },
+ after: {
+ all: logging
}
});
};