Return 401 status for unauthorized requests (see #48)

This commit is contained in:
Sandro Santilli
2012-09-05 20:16:55 +02:00
parent 2ae159c568
commit dcbe051654
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ module.exports = function(){
},
function gatekeep(err, data){
if(err) throw err;
if(data === "0") throw new Error("Sorry, you are unauthorized");
if(data === "0") throw new Error("Sorry, you are unauthorized (permission denied)");
return data;
},
function getDatabase(err, data){