From 790097afb63e767044ccf666c41e5da702820451 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Mon, 24 Feb 2025 16:52:59 -0500 Subject: [PATCH] Reuse db in auth flow --- lib/Auth.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Auth.ts b/lib/Auth.ts index d7956ada..c08923cf 100644 --- a/lib/Auth.ts +++ b/lib/Auth.ts @@ -141,15 +141,13 @@ export const AuthenticationOptions: AuthOptions = { today.toDateString() ) { // We use user.id since user._id strangely doesn't exist on user. - await getDatabase().then((db) => db.updateObjectById( CollectionId.Users, new ObjectId(typedUser._id?.toString()), { lastSignInDateTime: today, }, - ), - ); + ); } new ResendUtils().createContact(typedUser as User);