aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/services/posts
diff options
context:
space:
mode:
authorMarvin Borner2018-10-30 19:39:59 +0100
committerMarvin Borner2018-10-30 19:39:59 +0100
commitf585fea9f15958260e6af29feb1e9cc72bde64e3 (patch)
tree553b944b1e65755a0961d63e1bd745d2401dd152 /src/services/posts
parent94dcb2a098e978ff56eb711ae3c0b7abcb8d69ca (diff)
Added user object in post answer
Diffstat (limited to 'src/services/posts')
-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: [],