Revision notification (#7)

* Update build-success.ts

* Update compose.ts

* Update application.ts

* Update notification.ts

* Update utils.ts

* Update dokploy-restart.ts

* Update docker-cleanup.ts

* Update database-backup.ts

* Update build-success.ts

* Update build-success.ts
This commit is contained in:
shiqocred
2025-01-13 13:13:13 +07:00
committed by GitHub
parent d2094d6d76
commit 537950dd9f
8 changed files with 11 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
import { db } from "@dokploy/server/db";
import { notifications } from "@dokploy/server/db/schema";
import BuildSuccessEmail from "@dokploy/server/emails/emails/build-success";
import { Domain } from "@dokploy/server/services/domain";
import { renderAsync } from "@react-email/components";
import { and, eq } from "drizzle-orm";
import { format } from "date-fns";
@@ -17,10 +18,7 @@ interface Props {
applicationType: string;
buildLink: string;
adminId: string;
domains: {
host: string;
https: boolean;
}[];
domains: Domain[];
}
export const sendBuildSuccessNotifications = async ({

View File

@@ -130,7 +130,7 @@ export const sendDatabaseBackupNotifications = async ({
const messageText = `<b>${statusEmoji} Database Backup ${typeStatus}</b>\n\n<b>Project:</b> ${projectName}\n<b>Application:</b> ${applicationName}\n<b>Type:</b> ${databaseType}\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}${isError ? errorMsg : ""}`;
await sendTelegramNotification(telegram, messageText, []);
await sendTelegramNotification(telegram, messageText);
}
if (slack) {

View File

@@ -83,8 +83,7 @@ export const sendDockerCleanupNotifications = async (
if (telegram) {
await sendTelegramNotification(
telegram,
`<b>✅ Docker Cleanup</b>\n\n<b>Message:</b> ${message}\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}`,
[]
`<b>✅ Docker Cleanup</b>\n\n<b>Message:</b> ${message}\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}`
);
}

View File

@@ -68,8 +68,7 @@ export const sendDokployRestartNotifications = async () => {
if (telegram) {
await sendTelegramNotification(
telegram,
`<b>✅ Dokploy Serverd Restarted</b>\n\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}`,
[]
`<b>✅ Dokploy Serverd Restarted</b>\n\n<b>Date:</b> ${format(date, "PP")}\n<b>Time:</b> ${format(date, "pp")}`
);
}

View File

@@ -55,7 +55,7 @@ export const sendDiscordNotification = async (
export const sendTelegramNotification = async (
connection: typeof telegram.$inferInsert,
messageText: string,
inlineButton: {
inlineButton?: {
text: string;
url: string;
}[][]