From 4c89538d18d786865a238076bccb85f842ca57a0 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Sun, 6 Sep 2015 16:22:12 +0200 Subject: [PATCH] typos and comments --- website/src/libs/firebase.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/src/libs/firebase.js b/website/src/libs/firebase.js index 34a06e59d2..1a4155ee9f 100644 --- a/website/src/libs/firebase.js +++ b/website/src/libs/firebase.js @@ -1,6 +1,6 @@ var Firebase = require('firebase'); var nconf = require('nconf'); -var isProd = nconf.get('NODE_ENV') === 'production'; +var isProd = true; var firebaseRef; var firebaseConfig = nconf.get('FIREBASE'); @@ -35,10 +35,12 @@ api.removeUserFromGroup = function(groupId, userId){ firebaseRef.child('members/' + groupId + '/' + userId) .remove(); - firebaseRef.child('users/' + userId + '/' + groupId) + firebaseRef.child('users/' + userId + '/rooms/' + groupId) .remove(); }; +// FIXME not really necessary as long as we only store room data, +// as empty objects are automatically deleted (/members/... in future...) api.deleteGroup = function(groupId){ if(!isProd) return; if(!groupId) throw new Error('groupId is required.'); @@ -47,6 +49,8 @@ api.deleteGroup = function(groupId){ .remove(); }; +// FIXME not really necessary as long as we only store room data, +// as empty objects are automatically deleted api.deleteUser = function(userId){ if(!isProd) return; if(!userId) throw new Error('userId is required.');