summaryrefslogtreecommitdiff
path: root/website/src
diff options
context:
space:
mode:
Diffstat (limited to 'website/src')
-rw-r--r--website/src/actions/otp/send-otp.ts4
-rw-r--r--website/src/actions/sendmail.ts1
2 files changed, 5 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,
diff --git a/website/src/actions/sendmail.ts b/website/src/actions/sendmail.ts
index 06bd08a..bc3a2fa 100644
--- a/website/src/actions/sendmail.ts
+++ b/website/src/actions/sendmail.ts
@@ -75,6 +75,7 @@ async function sendmail({
subject: `joeac.net: ${name} left a message`,
text: `${name} <${email}> sent you a message:\n\n\n${message}`,
});
+
await db
.insert(SentEmails)
.values({ messageId: info.messageId, sentAt: Date.now() });