Allow path prefix multiplexing the dashboard and API. See https://github.com/pi-hole/FTL/pull/2319 for further details

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2025-03-02 20:20:10 +01:00
parent 22bfbd9d75
commit a7f1ca7800
27 changed files with 108 additions and 103 deletions

View File

@@ -5,7 +5,7 @@
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
/* global apiFailure:false, utils:false, initTable:false, updateFtlInfo:false */
/* global apiFailure:false, utils:false, apiUrl:false, initTable:false, updateFtlInfo:false */
var groups = [];
@@ -39,7 +39,7 @@ function populateGroupSelect(selectEl) {
// eslint-disable-next-line no-unused-vars
function getGroups(groupSelector) {
$.ajax({
url: "/api/groups",
url: apiUrl + "/groups",
type: "GET",
dataType: "json",
success: function (data) {
@@ -79,7 +79,7 @@ function delGroupItems(type, ids, table, listType = undefined) {
// Check input validity
if (!Array.isArray(ids)) return;
const url = "/api/" + type + "s:batchDelete";
const url = apiUrl + "/" + type + "s:batchDelete";
// use utils.hexDecode() to decode all clients
let idstring = "";