slight refactoring

This commit is contained in:
2023-05-28 22:23:41 +02:00
parent b4eab2d8e8
commit b3f740770a
3 changed files with 23 additions and 31 deletions

View File

@@ -59,9 +59,7 @@ async function getEncryptedEncryptionKey(): Promise<EncryptedEncryptionKey | voi
return data?.key
}
async function setEncryptedEncryptionKey(
encryptedEncryptionKey: EncryptedEncryptionKey | null
): Promise<void> {
async function setEncryptedEncryptionKey(encryptedEncryptionKey: EncryptedEncryptionKey | null) {
if (!user.value || !db.value) return
const docRef = doc(db.value, 'encryptionKeys', user.value.uid)
await setDoc(docRef, { key: encryptedEncryptionKey })