1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-26 07:33:21 -05:00

client: Set contentType header

This commit is contained in:
Aaron Lindsay 2017-11-13 20:49:26 -05:00
parent 5a6be5a07b
commit 81610adb72
6 changed files with 12 additions and 0 deletions

View File

@ -99,6 +99,7 @@ function create(account) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/accounts/", url: "v1/accounts/",
data: account.toJSON(), data: account.toJSON(),
@ -126,6 +127,7 @@ function update(account) {
$.ajax({ $.ajax({
type: "PUT", type: "PUT",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/accounts/"+account.AccountId+"/", url: "v1/accounts/"+account.AccountId+"/",
data: account.toJSON(), data: account.toJSON(),

View File

@ -58,6 +58,7 @@ function importOFX(account, password, startDate, endDate) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/accounts/"+account.AccountId+"/imports/ofx", url: "v1/accounts/"+account.AccountId+"/imports/ofx",
data: ofxdownload.toJSON(), data: ofxdownload.toJSON(),

View File

@ -128,6 +128,7 @@ function create(report) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/reports/", url: "v1/reports/",
data: report.toJSON(), data: report.toJSON(),
@ -155,6 +156,7 @@ function update(report) {
$.ajax({ $.ajax({
type: "PUT", type: "PUT",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/reports/"+report.ReportId+"/", url: "v1/reports/"+report.ReportId+"/",
data: report.toJSON(), data: report.toJSON(),

View File

@ -99,6 +99,7 @@ function create(security) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/securities/", url: "v1/securities/",
data: security.toJSON(), data: security.toJSON(),
@ -126,6 +127,7 @@ function update(security) {
$.ajax({ $.ajax({
type: "PUT", type: "PUT",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/securities/"+security.SecurityId+"/", url: "v1/securities/"+security.SecurityId+"/",
data: security.toJSON(), data: security.toJSON(),

View File

@ -137,6 +137,7 @@ function create(transaction) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/transactions/", url: "v1/transactions/",
data: transaction.toJSON(), data: transaction.toJSON(),
@ -164,6 +165,7 @@ function update(transaction) {
$.ajax({ $.ajax({
type: "PUT", type: "PUT",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/transactions/"+transaction.TransactionId+"/", url: "v1/transactions/"+transaction.TransactionId+"/",
data: transaction.toJSON(), data: transaction.toJSON(),

View File

@ -114,6 +114,7 @@ function create(user) {
dispatch(createUser(user)); dispatch(createUser(user));
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/users/", url: "v1/users/",
data: user.toJSON(), data: user.toJSON(),
@ -141,6 +142,7 @@ function login(user) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/sessions/", url: "v1/sessions/",
data: user.toJSON(), data: user.toJSON(),
@ -218,6 +220,7 @@ function update(user) {
$.ajax({ $.ajax({
type: "PUT", type: "PUT",
contentType: "application/json",
dataType: "json", dataType: "json",
url: "v1/users/"+user.UserId+"/", url: "v1/users/"+user.UserId+"/",
data: user.toJSON(), data: user.toJSON(),