mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -101,7 +101,9 @@ export const findEnvironmentsByProjectId = async (projectId: string) => {
|
|||||||
return projectEnvironments;
|
return projectEnvironments;
|
||||||
};
|
};
|
||||||
|
|
||||||
const environmentHasServices = (env: Awaited<ReturnType<typeof findEnvironmentById>>) => {
|
const environmentHasServices = (
|
||||||
|
env: Awaited<ReturnType<typeof findEnvironmentById>>,
|
||||||
|
) => {
|
||||||
return (
|
return (
|
||||||
(env.applications?.length ?? 0) > 0 ||
|
(env.applications?.length ?? 0) > 0 ||
|
||||||
(env.compose?.length ?? 0) > 0 ||
|
(env.compose?.length ?? 0) > 0 ||
|
||||||
|
|||||||
@@ -421,7 +421,10 @@ export const sendDatabaseBackupNotifications = async ({
|
|||||||
{ name: "Database Type", value: databaseType },
|
{ name: "Database Type", value: databaseType },
|
||||||
{ name: "Database Name", value: databaseName },
|
{ name: "Database Name", value: databaseName },
|
||||||
{ name: "Date", value: format(date, "PP pp") },
|
{ name: "Date", value: format(date, "PP pp") },
|
||||||
{ name: "Status", value: type === "success" ? "Successful" : "Failed" },
|
{
|
||||||
|
name: "Status",
|
||||||
|
value: type === "success" ? "Successful" : "Failed",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
if (type === "error" && errorMessage) {
|
if (type === "error" && errorMessage) {
|
||||||
facts.push({ name: "Error", value: errorMessage.substring(0, 500) });
|
facts.push({ name: "Error", value: errorMessage.substring(0, 500) });
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export const sendServerThresholdNotifications = async (
|
|||||||
|
|
||||||
for (const notification of notificationList) {
|
for (const notification of notificationList) {
|
||||||
const { discord, telegram, slack, custom, lark, pushover, teams } =
|
const { discord, telegram, slack, custom, lark, pushover, teams } =
|
||||||
notification;
|
notification;
|
||||||
|
|
||||||
if (discord) {
|
if (discord) {
|
||||||
const decorate = (decoration: string, text: string) =>
|
const decorate = (decoration: string, text: string) =>
|
||||||
|
|||||||
@@ -63,8 +63,17 @@ export const sendVolumeBackupNotifications = async ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (const notification of notificationList) {
|
for (const notification of notificationList) {
|
||||||
const { email, resend, discord, telegram, slack, gotify, ntfy, pushover, teams } =
|
const {
|
||||||
notification;
|
email,
|
||||||
|
resend,
|
||||||
|
discord,
|
||||||
|
telegram,
|
||||||
|
slack,
|
||||||
|
gotify,
|
||||||
|
ntfy,
|
||||||
|
pushover,
|
||||||
|
teams,
|
||||||
|
} = notification;
|
||||||
|
|
||||||
if (email || resend) {
|
if (email || resend) {
|
||||||
const subject = `Volume Backup ${type === "success" ? "Successful" : "Failed"} - ${applicationName}`;
|
const subject = `Volume Backup ${type === "success" ? "Successful" : "Failed"} - ${applicationName}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user