🔧 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:
2026-04-03 00:54:46 +06:00
parent 81f9801487
commit 3f0ead4265
18 changed files with 285 additions and 98 deletions
+16
View File
@@ -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);
};