Skip to content

Commit

Permalink
[BUGFIX] Ajax Calls for saveScores and prominentWords have the correc…
Browse files Browse the repository at this point in the history
…t JSON header now
  • Loading branch information
RinyVT committed Jan 29, 2025
1 parent ec86c77 commit ccf3e41
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Build/resources/javascript/redux/actions/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ const saveScores = (results) => {

if (typeof YoastConfig.data !== "undefined" && typeof YoastConfig.urls.saveScores !== "undefined") {
fetch(YoastConfig.urls.saveScores, {
method: 'post',
headers: new Headers(),
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
table: YoastConfig.data.table,
uid: YoastConfig.data.uid,
Expand Down
6 changes: 4 additions & 2 deletions Build/resources/javascript/redux/actions/relevantWords.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ export function saveRelevantWords(object, uid, pid, languageId, table, url)

if (url) {
fetch(url, {
method: 'post',
headers : new Headers(),
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({words: compressedWords, uid: uid, pid: pid, languageId: languageId, table: table})
});
}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ We will follow [Semantic Versioning](http://semver.org/).
### Fixed
- CSP issues within the `Cornerstone` form element and the Dashboard backend module
- Dark mode styling for the Dashboard and Overview backend module
- Ajax Calls for `saveScores` and `prominentWords` have the correct JSON header now

## 10.1.0 January 27, 2025
### Added
Expand Down
Loading

0 comments on commit ccf3e41

Please sign in to comment.