1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-03 20:58:39 -04:00

Stop using form elements for API

Just send the JSON as the request body
This commit is contained in:
2017-11-13 20:48:19 -05:00
parent 9624f0c5bc
commit 5a6be5a07b
23 changed files with 87 additions and 159 deletions

View File

@ -139,7 +139,7 @@ function create(transaction) {
type: "POST",
dataType: "json",
url: "v1/transactions/",
data: {transaction: transaction.toJSON()},
data: transaction.toJSON(),
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);
@ -166,7 +166,7 @@ function update(transaction) {
type: "PUT",
dataType: "json",
url: "v1/transactions/"+transaction.TransactionId+"/",
data: {transaction: transaction.toJSON()},
data: transaction.toJSON(),
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);