Update user.dart

This commit is contained in:
Tobe O 2017-03-11 01:49:20 -05:00 committed by GitHub
parent c7c3d1d85d
commit 44398a3ef3

View file

@ -23,6 +23,13 @@ configureServer(Db db) {
HookedServiceEvent.UPDATED,
HookedServiceEvent.REMOVED
], 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.
service.beforeCreated