Update user.dart
This commit is contained in:
parent
c7c3d1d85d
commit
44398a3ef3
1 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,13 @@ configureServer(Db db) {
|
||||||
HookedServiceEvent.REMOVED
|
HookedServiceEvent.REMOVED
|
||||||
], hooks.disable());
|
], hooks.disable());
|
||||||
|
|
||||||
|
// Don't broadcast user events over WebSockets - they're sensitive data!
|
||||||
|
service.beforeAll((e) {
|
||||||
|
if (e.params == null)
|
||||||
|
e.params = {'broadcast': false};
|
||||||
|
else e.params['broadcast'] = false;
|
||||||
|
});
|
||||||
|
|
||||||
// Validate new users, and also hash their passwords.
|
// Validate new users, and also hash their passwords.
|
||||||
service.beforeCreated
|
service.beforeCreated
|
||||||
..listen(validateEvent(CREATE_USER))
|
..listen(validateEvent(CREATE_USER))
|
||||||
|
|
Loading…
Reference in a new issue