mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-22 03:04:31 -04:00
* Rework #7646: `URLSearchParams` -> `JSON.stringify` * Single quotes * Send `id` as int
This commit is contained in:
1 parent
7915abd833
commit
32146bd849
1 file changed
+12
-6
+12
-6
@@ -238,11 +238,14 @@ function init_update_feed() {
|
||||
e.preventDefault();
|
||||
faviconExtBtn.disabled = true;
|
||||
fetch(faviconExtBtn.dataset.extensionUrl, {
|
||||
method: "POST",
|
||||
body: new URLSearchParams({
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
'_csrf': context.csrf,
|
||||
'extAction': 'query_icon_info',
|
||||
'id': feed_update.dataset.feedId
|
||||
'id': +feed_update.dataset.feedId
|
||||
}),
|
||||
}).then(resp => {
|
||||
if (!resp.ok) {
|
||||
@@ -274,11 +277,14 @@ function init_update_feed() {
|
||||
el.disabled = true;
|
||||
});
|
||||
await fetch(faviconExtBtn.dataset.extensionUrl, {
|
||||
method: "POST",
|
||||
body: new URLSearchParams({
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
'_csrf': context.csrf,
|
||||
'extAction': 'update_icon',
|
||||
'id': feed_update.dataset.feedId
|
||||
'id': +feed_update.dataset.feedId
|
||||
}),
|
||||
});
|
||||
faviconExtBtn.form.onsubmit = null;
|
||||
|
||||
Reference in new issue
Block a user