mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
This commit focuses on removing unused variables, adding placeholder error handling, and generally tidying up various files across the Dokploy application. Changes include: - Removing unused imports and variables - Adding placeholder error handling in catch blocks - Cleaning up commented-out code - Removing deprecated utility files - Improving type safety and code consistency
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import {
|
|
sendDiscordNotification,
|
|
sendEmailNotification,
|
|
} from "../utils/notifications/utils";
|
|
export const sendVerificationEmail = async (email: string, url: string) => {
|
|
await sendEmailNotification(
|
|
{
|
|
fromAddress: process.env.SMTP_FROM_ADDRESS || "",
|
|
toAddresses: [email],
|
|
smtpServer: process.env.SMTP_SERVER || "",
|
|
smtpPort: Number(process.env.SMTP_PORT),
|
|
username: process.env.SMTP_USERNAME || "",
|
|
password: process.env.SMTP_PASSWORD || "",
|
|
},
|
|
"Confirm your email | Dokploy",
|
|
`
|
|
Welcome to Dokploy!
|
|
Please confirm your email by clicking the link below:
|
|
<a href="${url}">
|
|
Confirm Email
|
|
</a>
|
|
`,
|
|
);
|
|
|
|
return true;
|
|
};
|
|
|
|
export const sendDiscordNotificationWelcome = async (email: string) => {
|
|
await sendDiscordNotification(
|
|
{
|
|
webhookUrl: process.env.DISCORD_WEBHOOK_URL || "",
|
|
},
|
|
{
|
|
title: "New User Registered",
|
|
color: 0x00ff00,
|
|
fields: [
|
|
{
|
|
name: "Email",
|
|
value: email,
|
|
inline: true,
|
|
},
|
|
],
|
|
timestamp: new Date(),
|
|
footer: {
|
|
text: "Dokploy User Registration Notification",
|
|
},
|
|
},
|
|
);
|
|
};
|