summaryrefslogtreecommitdiff
path: root/website/src/actions/otp
diff options
context:
space:
mode:
Diffstat (limited to 'website/src/actions/otp')
-rw-r--r--website/src/actions/otp/send-otp.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/website/src/actions/otp/send-otp.ts b/website/src/actions/otp/send-otp.ts
index 2781061..ee7fe35 100644
--- a/website/src/actions/otp/send-otp.ts
+++ b/website/src/actions/otp/send-otp.ts
@@ -50,6 +50,10 @@ to do anything.`,
`Sent OTP (${otpPretty}) to ${email}. Message ID: ${info.messageId}`,
);
+ await db
+ .insert(SentEmails)
+ .values({ messageId: info.messageId, sentAt: Date.now() });
+
await db.insert(Otp).values({
userId: email,
value: otp,