Deleting Plugin Objects was not possible #1486

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-02-05 11:57:37 +11:00
parent 76d37edc63
commit 1b6dc94bae
4 changed files with 29 additions and 16 deletions

View File

@@ -572,7 +572,7 @@ function purgeAllExecute() {
data: JSON.stringify({
dbtable: dbTable,
columnName: 'Plugin',
id: plugPrefix
id: [plugPrefix]
}),
contentType: "application/json",
success: function(response, textStatus) {
@@ -603,15 +603,18 @@ function deleteListed(plugPrefixArg, dbTableArg) {
// Ask for confirmation
showModalWarning(`${getString('Gen_Purge')} ${plugPrefix} ${dbTable}`, `${getString('Gen_AreYouSure')} (${idArr.length})`,
`${getString('Gen_Cancel')}`, `${getString('Gen_Okay')}`, "deleteListedExecute");
`${getString('Gen_Cancel')}`, `${getString('Gen_Okay')}`, () => deleteListedExecute(idArr));
}
// --------------------------------------------------------
function deleteListedExecute() {
function deleteListedExecute(idArr) {
const apiBase = getApiBase();
const apiToken = getSetting("API_TOKEN");
const url = `${apiBase}/dbquery/delete`;
console.log(idArr);
$.ajax({
method: "POST",
url: url,
@@ -619,7 +622,7 @@ function deleteListedExecute() {
data: JSON.stringify({
dbtable: dbTable,
columnName: 'Index',
id: idArr.toString()
id: idArr
}),
contentType: "application/json",
success: function(response, textStatus) {