From 5ed368769c889628ebae896556e5c6401cbafdaf Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 22 Sep 2024 22:14:36 +0300 Subject: refactoring --- web/share/js/index/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/share/js/index/main.js') diff --git a/web/share/js/index/main.js b/web/share/js/index/main.js index 3a0afb45..38c848c7 100644 --- a/web/share/js/index/main.js +++ b/web/share/js/index/main.js @@ -51,7 +51,7 @@ function __setAppText() { } function __loadKvmdInfo() { - tools.httpGet("/api/info?fields=auth,meta,extras", function(http) { + tools.httpGet("/api/info", {"fields": "auth,meta,extras"}, function(http) { if (http.status === 200) { let info = JSON.parse(http.responseText).result; @@ -121,7 +121,7 @@ function __makeApp(id, path, icon, name) { } function __logout() { - tools.httpPost("/api/auth/logout", function(http) { + tools.httpPost("/api/auth/logout", null, function(http) { if (http.status === 200 || http.status === 401 || http.status === 403) { document.location.href = "/login"; } else { -- cgit v1.2.3