From 811875dd2e6f5e335bce394833b8ce964f97afac Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Thu, 16 May 2024 18:04:27 -0700 Subject: [PATCH] idb-keyval: bits --- src/common/util/idbUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/util/idbUtils.ts b/src/common/util/idbUtils.ts index 1add4e85b..263e9b947 100644 --- a/src/common/util/idbUtils.ts +++ b/src/common/util/idbUtils.ts @@ -207,8 +207,8 @@ function deleteValue(dbName, key) { // Example usage: const myNewJsonString = '{"your": "new json string"}'; // Replace with your desired JSON string -setValue('keyval-store', 'app-chats', myNewJsonString).then(console.log).catch(console.error); -copyValue('keyval-store', 'app-chats', 'app-chats-copy').then(console.log).catch(console.error); -deleteValue('keyval-store', 'app-chats-prev').then(console.log).catch(console.error); +await setValue('keyval-store', 'app-chats', myNewJsonString); +await copyValue('keyval-store', 'app-chats', 'app-chats-copy'); +await deleteValue('keyval-store', 'app-chats-prev'); */