Fix: getHighestRecord -> getHighestRecordForWriting

This commit is contained in:
2019-07-15 22:52:13 +09:00
parent cfb843f91c
commit 3cb72799d4
6 changed files with 246 additions and 30 deletions
+19 -1
View File
@@ -74,6 +74,23 @@ DBService.prototype.tddSetup = function(command, onSucceededListener, onFailedLi
xhr.send("command=" + command);
}
DBService.prototype.tddRun = function(command, onSucceededListener, onFailedListener) {
var xhr = this.makeXhr(
"php/db/tdd_run.php",
(function() { // onreadystatechange
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
}).bind(this)
);
xhr.send("command=" + command);
}
// writing
DBService.prototype.requestWritingPlayerList = function(onSucceededListener, onFailedListener) {
var xhr = this.makeXhr(
@@ -155,7 +172,7 @@ DBService.prototype.updateTypingExamRecord = function(writingID, record, onSucce
);
}
DBService.prototype.getHighestRecord = function(onSucceededListener, onFailedListener) {
DBService.prototype.getTypingExamHighestRecord = function(writingID, onSucceededListener, onFailedListener) {
var xhr = this.makeXhr(
"php/writing/get_highest_record.php",
(function() { // onreadystatechange
@@ -172,5 +189,6 @@ DBService.prototype.getHighestRecord = function(onSucceededListener, onFailedLis
xhr.send(
"maestroID=" + this.maestroID
+ "&playerID=" + this.playerID
+ "&writingID=" + writingID
);
}