aboutsummaryrefslogtreecommitdiff
path: root/services/feedback
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-07-05 13:33:00 +0300
committereug-vs <eug-vs@keemail.me>2020-07-05 13:34:41 +0300
commit85b3cc20e8f453868d06d55a688ee8dfe90b80d4 (patch)
treed0af5a84e190a0b80d48c8456771b8cb7e0f5ca4 /services/feedback
parent8f48be5b879b1ae92937dfa1d1f37f08fb167dfa (diff)
downloadwhich-api-85b3cc20e8f453868d06d55a688ee8dfe90b80d4.tar.gz
feat: protect all services
Diffstat (limited to 'services/feedback')
-rw-r--r--services/feedback/feedback.hooks.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/feedback/feedback.hooks.ts b/services/feedback/feedback.hooks.ts
index 7ae6c5d..5bc2552 100644
--- a/services/feedback/feedback.hooks.ts
+++ b/services/feedback/feedback.hooks.ts
@@ -1,4 +1,4 @@
-import { populate, discard } from 'feathers-hooks-common';
+import { populate, discard, disallow } from 'feathers-hooks-common';
import requireAuth from '../../hooks/requireAuth';
import signAuthority from '../../hooks/signAuthority';
import sortByDate from '../../hooks/sortByDate';
@@ -18,7 +18,10 @@ const populateAuthor = populate({
export default {
before: {
create: [requireAuth, signAuthority],
- find: sortByDate
+ find: sortByDate,
+ remove: disallow('external'),
+ patch: disallow('external'),
+ update: disallow('external')
},
after: {
all: [populateAuthor, discard('authorId')]