fix #1803, when getting a drop do not return whole user, @lefnire it is ok to change api return data or we need to annouce it before so that third parties can update their code?

This commit is contained in:
Matteo Pagliazzi
2013-11-20 21:36:18 +01:00
parent bca346e616
commit 1a388fa994
3 changed files with 7 additions and 6 deletions

View File

@@ -65,13 +65,14 @@ angular.module('userServices', []).
// the user has been modified from another application, sync up
if(data.wasModified) {
delete data.wasModified;
_.extend(user, data);
$rootScope.$emit('userUpdated', user);
}
// Update user
_.extend(user, data);
// Emit event when user is synced
$rootScope.$emit('userSynced');
user._v = data._v;
}
sent.length = 0;
settings.fetching = false;