Fix mail sending

This commit is contained in:
Clément Pons
2025-04-22 09:28:48 +02:00
parent 7beeed8a61
commit 735dfb6980
5 changed files with 50 additions and 52 deletions

View File

@@ -5,6 +5,7 @@ import { usersDataTable, usersTable } from '~/db/schema';
import { schema } from '~/schemas/registration';
import { checkSession, logSession } from '~/server/utils/user';
import type { UserSession, UserSessionRequired } from '~/types/auth';
import sendMail from '~/server/tasks/mail';
interface SuccessHandler
{
@@ -82,7 +83,7 @@ export default defineEventHandler(async (e): Promise<Return> => {
id: emailId, timestamp,
}
});
await runTask('mail', {
await sendMail({
payload: {
type: 'mail',
to: [body.data.email],