OverviewFilesCommitsIssuesDocsReleasesPeers

apds commits / fe3a1b6

let us do bogbot.put instead of save
fe3a1b61bc0f442222ab9d943924096678f98644
by Ev Bogue <ev@evbogue.com> · 2025-01-04T21:52:38.000Z

Changed files (3) +5 -5

bogbot.js +1 -1
……@@ -165,7 +165,7 @@ bogbot.get = async (hash) => {
165165 return blob
166166}
167167
168bogbot.save = async (key, value) => {
168bogbot.put = async (key, value) => {
169169 await db.put(key, value)
170170}
171171
example.js +1 -1
……@@ -7,7 +7,7 @@ await bogbot.start('bog5example')
77
88if (!await bogbot.pubkey()) {
99 const keypair = await bogbot.generate()
10 await bogbot.save('keypair', keypair)
10 await bogbot.put('keypair', keypair)
1111}
1212
1313document.body.appendChild(await profile())
profile.js +3 -3
……@@ -47,12 +47,12 @@ export const profile = async () => {
4747 const croppedImage = canvas.toDataURL()
4848 avatarImg.src = croppedImage
4949 const hash = await bogbot.make(croppedImage)
50 await bogbot.save('image', hash)
50 await bogbot.put('image', hash)
5151 } else {
5252 const croppedImage = canvas.toDataURL()
5353 avatarImg.src = img.src
5454 const hash = await bogbot.make(img.src)
55 await bogbot.save('image', hash)
55 await bogbot.put('image', hash)
5656 }
5757 }
5858 img.src = e.target.result
……@@ -79,7 +79,7 @@ export const profile = async () => {
7979 h('button', {onclick: async () => {
8080 if (namer.value) {
8181 namer.placeholder = namer.value
82 await bogbot.save('name', namer.value)
82 await bogbot.put('name', namer.value)
8383 namer.value = ''
8484 }
8585 }}, ['Save'])