Fixed enableTwoFactor returning success when it wasn't successful

This commit is contained in:
Alexander Corn 2015-11-27 22:09:36 -05:00
parent 6f596b5b16
commit 8f580fc231

View File

@ -42,6 +42,13 @@ SteamCommunity.prototype.enableTwoFactor = function(callback) {
return;
}
if(body.response.status != 1) {
var error = new Error("Error " + body.response.status);
error.eresult = body.response.status;
callback(error);
return;
}
callback(null, body.response);
});
});