mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-02 20:28:38 -04:00
Stop using form elements for API
Just send the JSON as the request body
This commit is contained in:
@ -101,7 +101,7 @@ function create(security) {
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: "v1/securities/",
|
||||
data: {security: security.toJSON()},
|
||||
data: security.toJSON(),
|
||||
success: function(data, status, jqXHR) {
|
||||
var e = new Error();
|
||||
e.fromJSON(data);
|
||||
@ -128,7 +128,7 @@ function update(security) {
|
||||
type: "PUT",
|
||||
dataType: "json",
|
||||
url: "v1/securities/"+security.SecurityId+"/",
|
||||
data: {security: security.toJSON()},
|
||||
data: security.toJSON(),
|
||||
success: function(data, status, jqXHR) {
|
||||
var e = new Error();
|
||||
e.fromJSON(data);
|
||||
|
Reference in New Issue
Block a user