mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: implement decoration to embeds
This commit is contained in:
@@ -363,7 +363,7 @@ export const authRouter = createTRPCRouter({
|
||||
<a href="${WEBSITE_URL}/reset-password?token=${token}">
|
||||
Reset Password
|
||||
</a>
|
||||
|
||||
|
||||
`,
|
||||
);
|
||||
}),
|
||||
@@ -505,7 +505,7 @@ export const sendDiscordNotificationWelcome = async (newAdmin: Auth) => {
|
||||
webhookUrl: process.env.DISCORD_WEBHOOK_URL || "",
|
||||
},
|
||||
{
|
||||
title: " New User Registered",
|
||||
title: "New User Registered",
|
||||
color: 0x00ff00,
|
||||
fields: [
|
||||
{
|
||||
|
||||
@@ -187,11 +187,15 @@ export const notificationRouter = createTRPCRouter({
|
||||
.input(apiTestDiscordConnection)
|
||||
.mutation(async ({ input }) => {
|
||||
try {
|
||||
const decorate = (decoration: string, text: string) =>
|
||||
`${input.decoration ? decoration : ""} ${text}`.trim();
|
||||
|
||||
await sendDiscordNotification(input, {
|
||||
title: "> `🤚` - Test Notification",
|
||||
description: "> Hi, From Dokploy 👋",
|
||||
title: decorate(">", "`🤚` - Test Notification"),
|
||||
description: decorate(">", "Hi, From Dokploy 👋"),
|
||||
color: 0xf3f7f4,
|
||||
});
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
|
||||
Reference in New Issue
Block a user