mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 04:38:28 +00:00
Always use document.body.dataset.apiurl instead of the intermediate const apiUrl
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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, apiUrl:false, groups:false, apiFailure:false, updateFtlInfo:false, getGroups:false, processGroupResult:false, delGroupItems:false */
|
||||
/* global utils:false, groups:false, apiFailure:false, updateFtlInfo:false, getGroups:false, processGroupResult:false, delGroupItems:false */
|
||||
/* exported initTable */
|
||||
|
||||
var table;
|
||||
@@ -170,7 +170,7 @@ function initTable() {
|
||||
table = $("#listsTable").DataTable({
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: apiUrl + "/lists",
|
||||
url: document.body.dataset.apiurl + "/lists",
|
||||
dataSrc: "lists",
|
||||
type: "GET",
|
||||
},
|
||||
@@ -519,7 +519,7 @@ function addList(event) {
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: apiUrl + "/lists",
|
||||
url: document.body.dataset.apiurl + "/lists",
|
||||
method: "post",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
@@ -588,7 +588,7 @@ function editList() {
|
||||
utils.disableAll();
|
||||
utils.showAlert("info", "", "Editing address...", address);
|
||||
$.ajax({
|
||||
url: apiUrl + "/lists/" + encodeURIComponent(address) + "?type=" + type,
|
||||
url: document.body.dataset.apiurl + "/lists/" + encodeURIComponent(address) + "?type=" + type,
|
||||
method: "put",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
|
||||
Reference in New Issue
Block a user