Return 401 status for unauthorized requests (see #48)
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user