Skip to content

Commit 94cafa5

Browse files
authored
Merge pull request #111 from crobibero/jsonify
Convert remaining form post to json
2 parents c62c97a + e05bc09 commit 94cafa5

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/apiClient.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2473,9 +2473,9 @@ class ApiClient {
24732473
return this.ajax({
24742474
type: 'POST',
24752475
url,
2476-
data: {
2476+
data: JSON.stringify({
24772477
NewPw: newPassword
2478-
},
2478+
}),
24792479
contentType: 'application/json'
24802480
});
24812481
}
@@ -2491,14 +2491,13 @@ class ApiClient {
24912491

24922492
const url = this.getUrl(`Users/${userId}/Password`);
24932493

2494-
const postData = {};
2495-
2496-
postData.resetPassword = true;
2497-
24982494
return this.ajax({
24992495
type: 'POST',
25002496
url,
2501-
data: postData
2497+
data: JSON.stringify({
2498+
resetPassword: true
2499+
}),
2500+
contentType: 'application/json'
25022501
});
25032502
}
25042503

@@ -2509,14 +2508,13 @@ class ApiClient {
25092508

25102509
const url = this.getUrl(`Users/${userId}/EasyPassword`);
25112510

2512-
const postData = {};
2513-
2514-
postData.resetPassword = true;
2515-
25162511
return this.ajax({
25172512
type: 'POST',
25182513
url,
2519-
data: postData
2514+
data: JSON.stringify({
2515+
resetPassword: true
2516+
}),
2517+
contentType: 'application/json'
25202518
});
25212519
}
25222520

0 commit comments

Comments
 (0)