refactor: implement safe URL validation for whitelabeling settings in both client and server schemas

This commit is contained in:
Mauricio Siu
2026-03-10 00:55:01 -06:00
parent 33532d3cf7
commit 2e03cf3d48
3 changed files with 24 additions and 37 deletions

View File

@@ -1,7 +1,4 @@
import {
sendDiscordNotification,
sendEmailNotification,
} from "../utils/notifications/utils";
import { sendEmailNotification } from "../utils/notifications/utils";
export const sendEmail = async ({
email,
subject,
@@ -26,26 +23,3 @@ export const sendEmail = async ({
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",
},
},
);
};