Browse Source

Use proper request method

adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
72941b10bb
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 1
      src/webui/www/private/scripts/mocha-init.js
  2. 4
      src/webui/www/private/scripts/speedslider.js
  3. 2
      src/webui/www/private/views/rss.html
  4. 4
      src/webui/www/private/views/rssDownloader.html
  5. 2
      src/webui/www/private/views/search.html

1
src/webui/www/private/scripts/mocha-init.js

@ -1071,6 +1071,7 @@ const initializeWindows = function() { @@ -1071,6 +1071,7 @@ const initializeWindows = function() {
if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR[CONTEXT=MainWindow]')) {
new Request({
url: 'api/v2/app/shutdown',
method: 'post',
onSuccess: function() {
document.write('<!doctype html><html lang="${LANG}"><head> <meta charset="UTF-8"> <title>QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</title></head><body> <h1 style="text-align: center;">QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</h1></body></html>');
document.close();

4
src/webui/www/private/scripts/speedslider.js

@ -35,7 +35,7 @@ MochaUI.extend({ @@ -35,7 +35,7 @@ MochaUI.extend({
let maximum = 500;
new Request({
url: 'api/v2/transfer/uploadLimit',
method: 'post',
method: 'get',
data: {},
onSuccess: function(data) {
if (data) {
@ -139,7 +139,7 @@ MochaUI.extend({ @@ -139,7 +139,7 @@ MochaUI.extend({
let maximum = 500;
new Request({
url: 'api/v2/transfer/downloadLimit',
method: 'post',
method: 'get',
data: {},
onSuccess: function(data) {
if (data) {

2
src/webui/www/private/views/rss.html

@ -447,7 +447,7 @@ @@ -447,7 +447,7 @@
new Request.JSON({
url: 'api/v2/rss/items',
noCache: true,
method: 'post',
method: 'get',
data: {
withData: true
},

4
src/webui/www/private/views/rssDownloader.html

@ -442,7 +442,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also @@ -442,7 +442,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
new Request.JSON({
url: 'api/v2/rss/items',
noCache: true,
method: 'post',
method: 'get',
data: {
withData: false
},
@ -630,7 +630,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also @@ -630,7 +630,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
new Request.JSON({
url: 'api/v2/rss/matchingArticles',
noCache: true,
method: 'post',
method: 'get',
data: {
ruleName: ruleName
},

2
src/webui/www/private/views/search.html

@ -647,7 +647,7 @@ @@ -647,7 +647,7 @@
new Request.JSON({
url: url,
noCache: true,
method: 'post',
method: 'get',
data: {
id: activeSearchId,
limit: maxResults,

Loading…
Cancel
Save