slight refactoring
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user