Add: edit player enter_code

This commit is contained in:
2019-03-15 12:31:44 +09:00
parent 703d381e79
commit 0cbf30481b
3 changed files with 73 additions and 4 deletions
+17
View File
@@ -79,6 +79,23 @@ DBConnectManager.prototype.requestPlayerEnterCode = function(maestroID, playerID
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID);
}
DBConnectManager.prototype.requestEditPlayerEnterCode = function(maestroID, playerID, enterCode, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/player/edit_entercode.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON["result"] == "success")
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID + "&enter_code=" + enterCode);
}
/*
DBConnectManager.prototype.requestAppList = function(maestroID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();