aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/services/posts/posts.hooks.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/posts/posts.hooks.js')
-rw-r--r--src/services/posts/posts.hooks.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/services/posts/posts.hooks.js b/src/services/posts/posts.hooks.js
index 39ac996..f86bb74 100644
--- a/src/services/posts/posts.hooks.js
+++ b/src/services/posts/posts.hooks.js
@@ -1,18 +1,22 @@
const {authenticate} = require('@feathersjs/authentication').hooks;
+const processPost = require('../../hooks/process-post');
+
+const populateUser = require('../../hooks/populate-user');
+
module.exports = {
before: {
all: [authenticate('jwt')],
find: [],
get: [],
- create: [],
+ create: [processPost()],
update: [],
patch: [],
remove: []
},
after: {
- all: [],
+ all: [populateUser()],
find: [],
get: [],
create: [],