diff options
author | Marvin Borner | 2018-10-30 19:39:59 +0100 |
---|---|---|
committer | Marvin Borner | 2018-10-30 19:39:59 +0100 |
commit | f585fea9f15958260e6af29feb1e9cc72bde64e3 (patch) | |
tree | 553b944b1e65755a0961d63e1bd745d2401dd152 /src/services/posts | |
parent | 94dcb2a098e978ff56eb711ae3c0b7abcb8d69ca (diff) |
Added user object in post answer
Diffstat (limited to 'src/services/posts')
-rw-r--r-- | src/services/posts/posts.hooks.js | 8 |
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: [], |