diff options
author | Marvin Borner | 2018-10-25 22:22:55 +0200 |
---|---|---|
committer | Marvin Borner | 2018-10-25 22:22:55 +0200 |
commit | 1309e462efc4a7bbdf538e9d209133c1b3c138a6 (patch) | |
tree | 74be20f30280b52e891f7f3507c9d8569fad6b61 /src/services/posts/posts.hooks.js | |
parent | 185e0f26c6680c64cb5f2befdedd0cc3bbf09df5 (diff) |
Added authentication and post endpoint
Diffstat (limited to 'src/services/posts/posts.hooks.js')
-rw-r--r-- | src/services/posts/posts.hooks.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/services/posts/posts.hooks.js b/src/services/posts/posts.hooks.js new file mode 100644 index 0000000..39ac996 --- /dev/null +++ b/src/services/posts/posts.hooks.js @@ -0,0 +1,33 @@ +const {authenticate} = require('@feathersjs/authentication').hooks; + +module.exports = { + before: { + all: [authenticate('jwt')], + find: [], + get: [], + create: [], + update: [], + patch: [], + remove: [] + }, + + after: { + all: [], + find: [], + get: [], + create: [], + update: [], + patch: [], + remove: [] + }, + + error: { + all: [], + find: [], + get: [], + create: [], + update: [], + patch: [], + remove: [] + } +}; |