From f75e12d2613ba0dece74530504ffa013de1c6394 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Fri, 26 Aug 2011 12:16:55 +0300
Subject: [PATCH] set_key now returns true or false, this prevents accidental
 204 responses from being sent

---
 browserid/lib/wsapi.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/browserid/lib/wsapi.js b/browserid/lib/wsapi.js
index 7ea76cc93..5fe7a2975 100644
--- a/browserid/lib/wsapi.js
+++ b/browserid/lib/wsapi.js
@@ -280,7 +280,7 @@ function setup(app) {
       } else {
         // same account, we add the key
         db.addKeyToEmail(req.session.authenticatedUser, req.body.email, req.body.pubkey, function (rv) {
-          resp.json(rv);
+          resp.json(rv === undefined);
         });
       }
     });
-- 
GitLab