|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
/************************************************
|
|
|
|
|
*** Utilities to communicate with the server ***
|
|
|
|
|
************************************************/
|
|
|
|
|
var URL_BASE = "http://textsecure-test.herokuapp.com";
|
|
|
|
|
var URL_BASE = "http://sushiforeveryone.bluematt.me";
|
|
|
|
|
//var URL_BASE = "https://textsecure-service.whispersystems.org";
|
|
|
|
|
var URL_CALLS = {};
|
|
|
|
|
URL_CALLS['accounts'] = "/v1/accounts";
|
|
|
|
@ -42,9 +42,8 @@ var API = new function() {
|
|
|
|
|
|
|
|
|
|
beforeSend : function(xhr) {
|
|
|
|
|
if (param.user !== undefined &&
|
|
|
|
|
param.password !== undefined) {
|
|
|
|
|
param.password !== undefined)
|
|
|
|
|
xhr.setRequestHeader("Authorization", "Basic " + btoa(getString(param.user) + ":" + getString(param.password)));
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
success : function(response, textStatus, jqXHR) {
|
|
|
|
@ -69,7 +68,6 @@ var API = new function() {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.requestVerificationCode = function(number, success_callback, error_callback) {
|
|
|
|
|
this.doAjax({
|
|
|
|
|
call : 'accounts',
|
|
|
|
@ -141,5 +139,4 @@ var API = new function() {
|
|
|
|
|
do_auth : true
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}(); // API
|
|
|
|
|