diff --git a/js/actions/AccountActions.js b/js/actions/AccountActions.js index c3a51d3..804dbca 100644 --- a/js/actions/AccountActions.js +++ b/js/actions/AccountActions.js @@ -99,6 +99,7 @@ function create(account) { $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/accounts/", data: account.toJSON(), @@ -126,6 +127,7 @@ function update(account) { $.ajax({ type: "PUT", + contentType: "application/json", dataType: "json", url: "v1/accounts/"+account.AccountId+"/", data: account.toJSON(), diff --git a/js/actions/ImportActions.js b/js/actions/ImportActions.js index 74df91b..42d04aa 100644 --- a/js/actions/ImportActions.js +++ b/js/actions/ImportActions.js @@ -58,6 +58,7 @@ function importOFX(account, password, startDate, endDate) { $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/accounts/"+account.AccountId+"/imports/ofx", data: ofxdownload.toJSON(), diff --git a/js/actions/ReportActions.js b/js/actions/ReportActions.js index a769ced..5393021 100644 --- a/js/actions/ReportActions.js +++ b/js/actions/ReportActions.js @@ -128,6 +128,7 @@ function create(report) { $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/reports/", data: report.toJSON(), @@ -155,6 +156,7 @@ function update(report) { $.ajax({ type: "PUT", + contentType: "application/json", dataType: "json", url: "v1/reports/"+report.ReportId+"/", data: report.toJSON(), diff --git a/js/actions/SecurityActions.js b/js/actions/SecurityActions.js index da521af..4b7794f 100644 --- a/js/actions/SecurityActions.js +++ b/js/actions/SecurityActions.js @@ -99,6 +99,7 @@ function create(security) { $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/securities/", data: security.toJSON(), @@ -126,6 +127,7 @@ function update(security) { $.ajax({ type: "PUT", + contentType: "application/json", dataType: "json", url: "v1/securities/"+security.SecurityId+"/", data: security.toJSON(), diff --git a/js/actions/TransactionActions.js b/js/actions/TransactionActions.js index 345c898..4390e62 100644 --- a/js/actions/TransactionActions.js +++ b/js/actions/TransactionActions.js @@ -137,6 +137,7 @@ function create(transaction) { $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/transactions/", data: transaction.toJSON(), @@ -164,6 +165,7 @@ function update(transaction) { $.ajax({ type: "PUT", + contentType: "application/json", dataType: "json", url: "v1/transactions/"+transaction.TransactionId+"/", data: transaction.toJSON(), diff --git a/js/actions/UserActions.js b/js/actions/UserActions.js index 088573e..23ebfb4 100644 --- a/js/actions/UserActions.js +++ b/js/actions/UserActions.js @@ -114,6 +114,7 @@ function create(user) { dispatch(createUser(user)); $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/users/", data: user.toJSON(), @@ -141,6 +142,7 @@ function login(user) { $.ajax({ type: "POST", + contentType: "application/json", dataType: "json", url: "v1/sessions/", data: user.toJSON(), @@ -218,6 +220,7 @@ function update(user) { $.ajax({ type: "PUT", + contentType: "application/json", dataType: "json", url: "v1/users/"+user.UserId+"/", data: user.toJSON(),