Added better error messages to voting.

This commit is contained in:
Ajay Ramachandran
2019-07-29 21:06:15 -04:00
parent 366fd43752
commit 0d0b919106
3 changed files with 17 additions and 6 deletions

View File

@@ -100,12 +100,14 @@ function submitVote(type, UUID, callback) {
} else if (xmlhttp.readyState == 4 && xmlhttp.status == 405) {
//duplicate vote
callback({
successType: 0
successType: 0,
statusCode: xmlhttp.status
});
} else if (error) {
//error while connect
callback({
successType: -1
successType: -1,
statusCode: xmlhttp.status
});
}
})