Skip to content

Commit

Permalink
Fix Parameter data is required...
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Jun 17, 2019
1 parent ee8f874 commit 5cfd9c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/key-management/posts-gun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ OnlyRunInContext('background', 'gun')
* @param myUsername My username of this post
*/
export async function queryPostAESKey(salt: string, myUsername: string) {
return gun
const result = await gun
.get('posts')
.get(salt)
.get(myUsername)
.once().then!()
if (result.encryptedKey && result.salt) return result
return undefined
}

export async function publishPostAESKey(
Expand Down

0 comments on commit 5cfd9c3

Please sign in to comment.