Skip to content

Commit

Permalink
fix: delete old item
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 22, 2024
1 parent 6d7290a commit 83d0b11
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async function decodeKeys() {
if (!existingItem) {
// Add new item with decoded key
await db.files.put({ ...file, path: decodedId });
// Delete the old item
await db.files.delete(file.path);
}
}
});
Expand Down

0 comments on commit 83d0b11

Please sign in to comment.