mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 13:13:28 +08:00
Fixed enableTwoFactor returning success when it wasn't successful
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user