|
|
|
@ -80,8 +80,10 @@ function checkClientVersion(success, failure) {
|
|
|
|
|
* @return {undefined}
|
|
|
|
|
*/
|
|
|
|
|
function callAPI(action, data, success, failure) {
|
|
|
|
|
if (typeof data.username == "undefined" && typeof data.password == "undefined") {
|
|
|
|
|
data.username = localStorage.getItem("username");
|
|
|
|
|
data.password = localStorage.getItem("password");
|
|
|
|
|
}
|
|
|
|
|
return $.ajax({
|
|
|
|
|
type: 'POST',
|
|
|
|
|
dataType: 'json',
|
|
|
|
@ -133,8 +135,10 @@ function callAPI(action, data, success, failure) {
|
|
|
|
|
* @return {undefined}
|
|
|
|
|
*/
|
|
|
|
|
function callAPIRawResponse(action, data, success, failure) {
|
|
|
|
|
if (typeof data.username == "undefined" && typeof data.password == "undefined") {
|
|
|
|
|
data.username = localStorage.getItem("username");
|
|
|
|
|
data.password = localStorage.getItem("password");
|
|
|
|
|
}
|
|
|
|
|
return $.ajax({
|
|
|
|
|
type: 'POST',
|
|
|
|
|
url: getActionUrl(action),
|
|
|
|
|