You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2016/02/16 16:14:43 UTC

[26/50] ignite git commit: IGNITE-843 WIP rework server side to promises.

IGNITE-843 WIP rework server side to promises.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ba69d634
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ba69d634
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ba69d634

Branch: refs/heads/ignite-843-rc3
Commit: ba69d6345734445457f90bd705f8835862b82465
Parents: 389c662
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Feb 16 07:09:54 2016 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Feb 16 07:09:54 2016 +0700

----------------------------------------------------------------------
 modules/control-center-web/src/main/js/serve/routes/admin.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ba69d634/modules/control-center-web/src/main/js/serve/routes/admin.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/routes/admin.js b/modules/control-center-web/src/main/js/serve/routes/admin.js
index 0736277..50488b1 100644
--- a/modules/control-center-web/src/main/js/serve/routes/admin.js
+++ b/modules/control-center-web/src/main/js/serve/routes/admin.js
@@ -40,9 +40,14 @@ module.exports.factory = function(_, express, nodemailer, settings, mongo) {
         // Remove user.
         router.post('/remove', (req, res) => {
             const userId = req.body.userId;
+            let user = {};
 
             mongo.Account.findByIdAndRemove(userId).exec()
-                .then(() => mongo.spaces(userId))
+                .then((removedUser) => {
+                    user = removedUser;
+
+                    return mongo.spaces(userId);
+                })
                 .then((spaces) => {
                     const promises = [];