aboutsummaryrefslogtreecommitdiff
path: root/html/payload_create.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-22 13:49:40 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-22 13:49:40 +0100
commit7218849ae2f43aee6b3462a30e07caf5bac3d22b (patch)
tree3de3b31c07e532edf7373faf4a267f313dc2ed25 /html/payload_create.js
parent046b8a7b3e7259bf451926732e6221076b1d4153 (diff)
downloadbrowser-extension-7218849ae2f43aee6b3462a30e07caf5bac3d22b.tar.gz
browser-extension-7218849ae2f43aee6b3462a30e07caf5bac3d22b.zip
add a mapping/resources installation dialog
Diffstat (limited to 'html/payload_create.js')
-rw-r--r--html/payload_create.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/html/payload_create.js b/html/payload_create.js
index 503a461..8828809 100644
--- a/html/payload_create.js
+++ b/html/payload_create.js
@@ -137,12 +137,11 @@ async function save_payload(saving)
{
const db = await haketilodb.get();
const tx_starter = haketilodb.start_items_transaction;
- const tx_ctx = await tx_starter(["resources", "mappings"], saving.files);
+ const tx_ctx = await tx_starter(["resource", "mapping"], saving.files);
- for (const [type, store_name] of
- [["resource", "resources"], ["mapping", "mappings"]]) {
+ for (const type of ["resource", "mapping"]) {
if (!saving[`override_${type}`] &&
- (await haketilodb.idb_get(tx_ctx.transaction, store_name,
+ (await haketilodb.idb_get(tx_ctx.transaction, type,
saving.identifier))) {
saving.ask_override = type;
return;