From 9b108480a8d26b98e3cb4da2cff99adc3d986341 Mon Sep 17 00:00:00 2001
From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Mon, 30 Mar 2026 22:49:52 +0000
Subject: [PATCH] [autofix.ci] apply automated fixes
---
.../src/emails/emails/dokploy-backup.tsx | 191 +++++++++---------
.../server/src/utils/backups/web-server.ts | 10 +-
.../src/utils/notifications/dokploy-backup.ts | 8 +-
3 files changed, 103 insertions(+), 106 deletions(-)
diff --git a/packages/server/src/emails/emails/dokploy-backup.tsx b/packages/server/src/emails/emails/dokploy-backup.tsx
index ea2246eb6..327a02a5b 100644
--- a/packages/server/src/emails/emails/dokploy-backup.tsx
+++ b/packages/server/src/emails/emails/dokploy-backup.tsx
@@ -1,105 +1,106 @@
import {
- Body,
- Container,
- Head,
- Heading,
- Html,
- Img,
- Preview,
- Section,
- Tailwind,
- Text,
+ Body,
+ Container,
+ Head,
+ Heading,
+ Html,
+ Img,
+ Preview,
+ Section,
+ Tailwind,
+ Text,
} from "@react-email/components";
export type TemplateProps = {
- type: "error" | "success";
- errorMessage?: string;
- date: string;
- backupSize?: string;
+ type: "error" | "success";
+ errorMessage?: string;
+ date: string;
+ backupSize?: string;
};
export const DokployBackupEmail = ({
- type = "success",
- errorMessage,
- date = "2023-05-01T00:00:00.000Z",
- backupSize,
+ type = "success",
+ errorMessage,
+ date = "2023-05-01T00:00:00.000Z",
+ backupSize,
}: TemplateProps) => {
- const previewText = `Dokploy instance backup was ${type === "success" ? "successful ✅" : "failed ❌"}`;
-
- return (
-
- {previewText}
-
-
-
-
-
-
-
-
- Dokploy Instance Backup
-
-
- Hello,
-
-
- Your Dokploy instance backup was{" "}
- {type === "success"
- ? "successful ✅"
- : "failed. Please check the error message below. ❌"}
- .
-
-
- Details:
-
- Backup Type: Complete Dokploy Instance
-
-
- Content: /etc/dokploy + PostgreSQL Database
-
- {backupSize && (
-
- Backup Size: {backupSize}
-
- )}
-
- Date: {date}
-
-
- Status: {type === "success" ? "Successful" : "Failed"}
-
-
- {type === "error" && errorMessage ? (
-
- Reason:
-
- {errorMessage || "Error message not provided"}
-
-
- ) : null}
-
-
-
-
- );
+ const previewText = `Dokploy instance backup was ${type === "success" ? "successful ✅" : "failed ❌"}`;
+
+ return (
+
+ {previewText}
+
+
+
+
+
+
+
+
+ Dokploy Instance Backup
+
+
+ Hello,
+
+
+ Your Dokploy instance backup was{" "}
+ {type === "success"
+ ? "successful ✅"
+ : "failed. Please check the error message below. ❌"}
+ .
+
+
+ Details:
+
+ Backup Type: Complete Dokploy Instance
+
+
+ Content: /etc/dokploy + PostgreSQL Database
+
+ {backupSize && (
+
+ Backup Size: {backupSize}
+
+ )}
+
+ Date: {date}
+
+
+ Status:{" "}
+ {type === "success" ? "Successful" : "Failed"}
+
+
+ {type === "error" && errorMessage ? (
+
+ Reason:
+
+ {errorMessage || "Error message not provided"}
+
+
+ ) : null}
+
+
+
+
+ );
};
-export default DokployBackupEmail;
\ No newline at end of file
+export default DokployBackupEmail;
diff --git a/packages/server/src/utils/backups/web-server.ts b/packages/server/src/utils/backups/web-server.ts
index 04c35ed46..19dd44eed 100644
--- a/packages/server/src/utils/backups/web-server.ts
+++ b/packages/server/src/utils/backups/web-server.ts
@@ -124,11 +124,11 @@ export const runWebServerBackup = async (backup: BackupSchedule) => {
);
writeStream.end();
await sendDokployBackupNotifications({
- type: "error",
- // @ts-ignore
- errorMessage: error?.message || "Error message not provided",
- backupSize: formatBytes(computedBackupSize),
- });
+ type: "error",
+ // @ts-ignore
+ errorMessage: error?.message || "Error message not provided",
+ backupSize: formatBytes(computedBackupSize),
+ });
await updateDeploymentStatus(deployment.deploymentId, "error");
throw error;
}
diff --git a/packages/server/src/utils/notifications/dokploy-backup.ts b/packages/server/src/utils/notifications/dokploy-backup.ts
index 707f53839..580dd1baa 100644
--- a/packages/server/src/utils/notifications/dokploy-backup.ts
+++ b/packages/server/src/utils/notifications/dokploy-backup.ts
@@ -51,11 +51,7 @@ export const sendDokployBackupNotifications = async ({
backupSize,
}),
).catch();
- await sendEmailNotification(
- email,
- "Dokploy instance backup",
- template,
- );
+ await sendEmailNotification(email, "Dokploy instance backup", template);
}
if (discord) {
@@ -319,4 +315,4 @@ export const sendDokployBackupNotifications = async ({
});
}
}
-};
\ No newline at end of file
+};