mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 04:38:28 +00:00
Fix addList function to include type in API request URL
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -515,12 +515,12 @@ function addList(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: document.body.dataset.apiurl + "/lists",
|
url: document.body.dataset.apiurl + "/lists?type=" + encodeURIComponent(type),
|
||||||
method: "post",
|
method: "post",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
data: JSON.stringify({ address: addresses, comment, type, groups: group }),
|
data: JSON.stringify({ address: addresses, comment, groups: group }),
|
||||||
success(data) {
|
success(data) {
|
||||||
utils.enableAll();
|
utils.enableAll();
|
||||||
utils.listsAlert(type + "list", addresses, data);
|
utils.listsAlert(type + "list", addresses, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user