From cc1bd33b35933d6b69585e89f9784635aa075a37 Mon Sep 17 00:00:00 2001 From: vincanger <70215737+vincanger@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:34:36 +0200 Subject: [PATCH] type jobs --- src/server/workers/checkAndQueueEmails.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/workers/checkAndQueueEmails.ts b/src/server/workers/checkAndQueueEmails.ts index ed90ff5..5320e2c 100644 --- a/src/server/workers/checkAndQueueEmails.ts +++ b/src/server/workers/checkAndQueueEmails.ts @@ -2,7 +2,7 @@ import { emailSender } from '@wasp/email/index.js' import type { Email } from '@wasp/email/core/types'; import type { User } from '@wasp/entities' -import type { Context } from '../types'; +import type { EmailChecker } from '@wasp/jobs/emailChecker' const emailToSend: Email = { to: '', @@ -22,7 +22,7 @@ const emailToSend: Email = { }; // you could use this function to send newsletters, expiration notices, etc. -export async function checkAndQueueEmails(_args: unknown, context: Context) { +export const checkAndQueueEmails: EmailChecker = async (_args , context) => { // e.g. you could send an offer email 2 weeks before their subscription expires const currentDate = new Date();