🔧 chore(account): update account module structure and email queue processing
- Enhanced account management with new validation and Swagger documentation. - Updated Prisma schemas and migrations for the account and profile. - Improved email handling mechanisms in the email queue system with new worker functionality. - Adjusted Docker configurations and package dependencies for better integration.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { otpTemplate } from "../../templates/otpTemplate";
|
||||
import sendMail from "../../utils/mail_sender";
|
||||
import { TEmailQueue } from "./email.queue";
|
||||
|
||||
// email.processor.ts
|
||||
export const emailProcessor = async (job: any) => {
|
||||
const payload: TEmailQueue = job.data;
|
||||
await sendMail({
|
||||
to: payload.email as string,
|
||||
subject: payload.subject,
|
||||
htmlBody: otpTemplate(payload),
|
||||
textBody: payload.textBody || "",
|
||||
name: payload.name,
|
||||
});
|
||||
console.log("Sending email job complete:", job.id);
|
||||
};
|
||||
Reference in New Issue
Block a user