aboutsummaryrefslogtreecommitdiff
path: root/html/item_list.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/item_list.js')
-rw-r--r--html/item_list.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/html/item_list.js b/html/item_list.js
index 51950d5..a616713 100644
--- a/html/item_list.js
+++ b/html/item_list.js
@@ -200,23 +200,22 @@ function on_dialog_hide(list_ctx)
async function remove_single_item(item_type, identifier)
{
- const store = ({resource: "resources", mapping: "mappings"})[item_type];
const transaction_ctx =
- await haketilodb.start_items_transaction([store], {});
+ await haketilodb.start_items_transaction([item_type], {});
await haketilodb[`remove_${item_type}`](identifier, transaction_ctx);
await haketilodb.finalize_transaction(transaction_ctx);
}
function resource_list()
{
- return item_list(resource_preview, haketilodb.track.resources,
+ return item_list(resource_preview, haketilodb.track.resource,
id => remove_single_item("resource", id));
}
#EXPORT resource_list
function mapping_list()
{
- return item_list(mapping_preview, haketilodb.track.mappings,
+ return item_list(mapping_preview, haketilodb.track.mapping,
id => remove_single_item("mapping", id));
}
#EXPORT mapping_list