From 970905198be523439b4bb37b6cb2d5468a5b1e41 Mon Sep 17 00:00:00 2001
From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Tue, 30 Sep 2025 05:05:28 +0000
Subject: [PATCH] [autofix.ci] apply automated fixes
---
apps/dokploy/components/icons/notification-icons.tsx | 4 ++--
.../server/src/utils/notifications/database-backup.ts | 7 ++++---
packages/server/src/utils/notifications/utils.ts | 9 +++++++--
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/apps/dokploy/components/icons/notification-icons.tsx b/apps/dokploy/components/icons/notification-icons.tsx
index d73186f2b..e43495908 100644
--- a/apps/dokploy/components/icons/notification-icons.tsx
+++ b/apps/dokploy/components/icons/notification-icons.tsx
@@ -97,8 +97,8 @@ export const MattermostIcon = ({ className }: Props) => {
xmlns="http://www.w3.org/2000/svg"
className={cn("size-8", className)}
>
-
-
+
+
);
};
diff --git a/packages/server/src/utils/notifications/database-backup.ts b/packages/server/src/utils/notifications/database-backup.ts
index 9ba76f0d5..6f5a9d0af 100644
--- a/packages/server/src/utils/notifications/database-backup.ts
+++ b/packages/server/src/utils/notifications/database-backup.ts
@@ -361,9 +361,10 @@ export const sendDatabaseBackupNotifications = async ({
if (mattermost) {
const statusEmoji = type === "success" ? "✅" : "❌";
const typeStatus = type === "success" ? "Successful" : "Failed";
- const errorMsg = type === "error" && errorMessage
- ? `\n\n**Error:**\n\`\`\`\n${errorMessage}\n\`\`\``
- : "";
+ const errorMsg =
+ type === "error" && errorMessage
+ ? `\n\n**Error:**\n\`\`\`\n${errorMessage}\n\`\`\``
+ : "";
await sendMattermostNotification(mattermost, {
text: `**${statusEmoji} Database Backup ${typeStatus}**\n\n**Project:** ${projectName}\n**Application:** ${applicationName}\n**Type:** ${databaseType}\n**Database Name:** ${databaseName}\n**Date:** ${format(date, "PP")}\n**Time:** ${format(date, "pp")}${errorMsg}`,
diff --git a/packages/server/src/utils/notifications/utils.ts b/packages/server/src/utils/notifications/utils.ts
index 1b20ab577..a5f59d053 100644
--- a/packages/server/src/utils/notifications/utils.ts
+++ b/packages/server/src/utils/notifications/utils.ts
@@ -163,9 +163,13 @@ export const sendMattermostNotification = async (
const payload = {
...message,
// Only include username if it's provided and not empty
- ...(message.username && message.username.trim() && { username: message.username }),
+ ...(message.username &&
+ message.username.trim() && { username: message.username }),
// Only include wchannel if it's provided and not empty
- ...(message.channel && message.channel.trim() && { channel: `#${message.channel.replace('#', '')}` }),
+ ...(message.channel &&
+ message.channel.trim() && {
+ channel: `#${message.channel.replace("#", "")}`,
+ }),
};
await fetch(connection.webhookUrl, {
@@ -176,6 +180,7 @@ export const sendMattermostNotification = async (
} catch (err) {
console.log(err);
}
+};
export const sendLarkNotification = async (
connection: typeof lark.$inferInsert,