fix: refactoring, adding express api.

This commit is contained in:
charlesgauthereau
2026-01-31 22:15:01 +01:00
parent 7c5d57ddc1
commit cc87cf68b5
33 changed files with 1028 additions and 142 deletions
+1
View File
@@ -1,4 +1,5 @@
import nodemailer from "nodemailer";
import {Server} from "./types"
export const createTransporter = (server: Server) => {
const portNumber = Number(server.port);
+1
View File
@@ -3,6 +3,7 @@ import {db} from "@/db";
import {eq} from "drizzle-orm";
import * as drizzleDb from "@/db";
import {createTransporter} from "@/lib/email/helpers";
import {Payload} from "@/lib/email/types";
export const sendEmail = async (data: Payload) => {
const settings = await db
+2 -2
View File
@@ -1,14 +1,14 @@
"use server";
type Payload = {
export type Payload = {
to: string;
from?: string;
subject: string;
html: any;
};
type Server = {
export type Server = {
host: string;
port: number;
user: string;