mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 00:09:41 +00:00
firebase: remove instead of set(false)
This commit is contained in:
parent
db0a73d332
commit
9764e31e2a
1 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ api.addUserToGroup = function(groupId, userId){
|
|||
firebaseRef.child('members/' + groupId + '/' + userId)
|
||||
.set(true);
|
||||
|
||||
firebaseRef.child('users/' + userId + '/' + groupId)
|
||||
firebaseRef.child('users/' + userId + '/rooms/' + groupId)
|
||||
.set(true);
|
||||
};
|
||||
|
||||
|
|
@ -35,10 +35,10 @@ api.removeUserFromGroup = function(groupId, userId){
|
|||
if(!userId || !groupId) throw new Error('groupId, userId are required.');
|
||||
|
||||
firebaseRef.child('members/' + groupId + '/' + userId)
|
||||
.set(false);
|
||||
.remove();
|
||||
|
||||
firebaseRef.child('users/' + userId + '/' + groupId)
|
||||
.set(false);
|
||||
.remove();
|
||||
};
|
||||
|
||||
api.userLeaves
|
||||
Loading…
Reference in a new issue