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

@@ -3,6 +3,7 @@ import { eq, or } from 'drizzle-orm';
import { z } from 'zod';
import useDatabase from '~/composables/useDatabase';
import { usersTable } from '~/db/schema';
import sendMail from '~/server/tasks/mail';
const schema = z.object({
profile: z.string(),
@@ -32,7 +33,7 @@ export default defineEventHandler(async (e) => {
id, timestamp,
}
});
await runTask('mail', {
await sendMail({
payload: {
type: 'mail',
data: {