From 747a9a7ae5ff11447a6628c40f25d2be499e5e00 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 16 Nov 2019 23:26:34 -0500 Subject: [PATCH] await --- src/api/Security.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/Security.ts b/src/api/Security.ts index 95a2412..b53787f 100644 --- a/src/api/Security.ts +++ b/src/api/Security.ts @@ -32,7 +32,7 @@ export default class Security { const cipher = crypto.createCipheriv('aes-256-gcm', this.keys.key, this.keys.iv); let encrypted = cipher.update(JSON.stringify(account), 'utf8', 'base64'); encrypted += cipher.final('base64'); - account.updateOne({ salt }); + await account.updateOne({ salt }); return `${salt}:${encrypted}`; }