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 utils:false, apiFailure:false, updateFtlInfo:false, processGroupResult:false, delGroupItems:false */
/* global utils:false, apiUrl:false, apiFailure:false, updateFtlInfo:false, processGroupResult:false, delGroupItems:false */
var table;
@@ -26,7 +26,7 @@ $(function () {
table = $("#groupsTable").DataTable({
processing: true,
ajax: {
url: "/api/groups",
url: apiUrl + "/groups",
error: handleAjaxError,
dataSrc: "groups",
type: "GET",
@@ -261,7 +261,7 @@ function addGroup() {
}
$.ajax({
url: "/api/groups",
url: apiUrl + "/groups",
method: "post",
dataType: "json",
processData: false,
@@ -329,7 +329,7 @@ function editGroup() {
utils.disableAll();
utils.showAlert("info", "", "Editing group...", oldName);
$.ajax({
url: "/api/groups/" + oldName,
url: apiUrl + "/groups/" + oldName,
method: "put",
dataType: "json",
processData: false,