diff --git a/apps/dokploy/server/api/routers/notification.ts b/apps/dokploy/server/api/routers/notification.ts
index 61a1310e..f8869503 100644
--- a/apps/dokploy/server/api/routers/notification.ts
+++ b/apps/dokploy/server/api/routers/notification.ts
@@ -134,7 +134,7 @@ export const notificationRouter = createTRPCRouter({
.input(apiTestTelegramConnection)
.mutation(async ({ input }) => {
try {
- await sendTelegramNotification(input, "Hi, From Dokploy 👋", []);
+ await sendTelegramNotification(input, "Hi, From Dokploy 👋");
return true;
} catch (error) {
throw new TRPCError({
diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts
index fa690952..068e69b3 100644
--- a/packages/server/src/services/application.ts
+++ b/packages/server/src/services/application.ts
@@ -176,7 +176,6 @@ export const deployApplication = async ({
}) => {
const application = await findApplicationById(applicationId);
const buildLink = `${await getDokployUrl()}/dashboard/project/${application.projectId}/services/application/${application.applicationId}?tab=deployments`;
- const domains = application.domains.map(({ host, https }) => ({ host, https }));
const deployment = await createDeployment({
applicationId: applicationId,
title: titleLog,
@@ -214,7 +213,7 @@ export const deployApplication = async ({
applicationType: "application",
buildLink,
adminId: application.project.adminId,
- domains
+ domains: application.domains
});
} catch (error) {
await updateDeploymentStatus(deployment.deploymentId, "error");
@@ -287,7 +286,6 @@ export const deployRemoteApplication = async ({
}) => {
const application = await findApplicationById(applicationId);
const buildLink = `${await getDokployUrl()}/dashboard/project/${application.projectId}/services/application/${application.applicationId}?tab=deployments`;
- const domains = application.domains.map(({ host, https }) => ({ host, https }));
const deployment = await createDeployment({
applicationId: applicationId,
title: titleLog,
@@ -335,7 +333,7 @@ export const deployRemoteApplication = async ({
applicationType: "application",
buildLink,
adminId: application.project.adminId,
- domains
+ domains: application.domains
});
} catch (error) {
// @ts-ignore
diff --git a/packages/server/src/services/compose.ts b/packages/server/src/services/compose.ts
index 2ed3d462..8561dd37 100644
--- a/packages/server/src/services/compose.ts
+++ b/packages/server/src/services/compose.ts
@@ -209,7 +209,6 @@ export const deployCompose = async ({
const buildLink = `${await getDokployUrl()}/dashboard/project/${
compose.projectId
}/services/compose/${compose.composeId}?tab=deployments`;
- const domains = compose.domains.map(({ host, https }) => ({ host, https }));
const deployment = await createDeploymentCompose({
composeId: composeId,
title: titleLog,
@@ -244,7 +243,7 @@ export const deployCompose = async ({
applicationType: "compose",
buildLink,
adminId: compose.project.adminId,
- domains
+ domains: compose.domains,
});
} catch (error) {
await updateDeploymentStatus(deployment.deploymentId, "error");
@@ -315,7 +314,6 @@ export const deployRemoteCompose = async ({
const buildLink = `${await getDokployUrl()}/dashboard/project/${
compose.projectId
}/services/compose/${compose.composeId}?tab=deployments`;
- const domains = compose.domains.map(({ host, https }) => ({ host, https }));
const deployment = await createDeploymentCompose({
composeId: composeId,
title: titleLog,
@@ -369,7 +367,7 @@ export const deployRemoteCompose = async ({
applicationType: "compose",
buildLink,
adminId: compose.project.adminId,
- domains
+ domains: compose.domains,
});
} catch (error) {
// @ts-ignore
diff --git a/packages/server/src/utils/notifications/build-success.ts b/packages/server/src/utils/notifications/build-success.ts
index 366b4591..e30ec37b 100644
--- a/packages/server/src/utils/notifications/build-success.ts
+++ b/packages/server/src/utils/notifications/build-success.ts
@@ -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 ({
diff --git a/packages/server/src/utils/notifications/database-backup.ts b/packages/server/src/utils/notifications/database-backup.ts
index 6594f87c..74cbf144 100644
--- a/packages/server/src/utils/notifications/database-backup.ts
+++ b/packages/server/src/utils/notifications/database-backup.ts
@@ -130,7 +130,7 @@ export const sendDatabaseBackupNotifications = async ({
const messageText = `${statusEmoji} Database Backup ${typeStatus}\n\nProject: ${projectName}\nApplication: ${applicationName}\nType: ${databaseType}\nDate: ${format(date, "PP")}\nTime: ${format(date, "pp")}${isError ? errorMsg : ""}`;
- await sendTelegramNotification(telegram, messageText, []);
+ await sendTelegramNotification(telegram, messageText);
}
if (slack) {
diff --git a/packages/server/src/utils/notifications/docker-cleanup.ts b/packages/server/src/utils/notifications/docker-cleanup.ts
index 8623867f..adcd569e 100644
--- a/packages/server/src/utils/notifications/docker-cleanup.ts
+++ b/packages/server/src/utils/notifications/docker-cleanup.ts
@@ -83,8 +83,7 @@ export const sendDockerCleanupNotifications = async (
if (telegram) {
await sendTelegramNotification(
telegram,
- `✅ Docker Cleanup\n\nMessage: ${message}\nDate: ${format(date, "PP")}\nTime: ${format(date, "pp")}`,
- []
+ `✅ Docker Cleanup\n\nMessage: ${message}\nDate: ${format(date, "PP")}\nTime: ${format(date, "pp")}`
);
}
diff --git a/packages/server/src/utils/notifications/dokploy-restart.ts b/packages/server/src/utils/notifications/dokploy-restart.ts
index 7ee50b6a..484da16d 100644
--- a/packages/server/src/utils/notifications/dokploy-restart.ts
+++ b/packages/server/src/utils/notifications/dokploy-restart.ts
@@ -68,8 +68,7 @@ export const sendDokployRestartNotifications = async () => {
if (telegram) {
await sendTelegramNotification(
telegram,
- `✅ Dokploy Serverd Restarted\n\nDate: ${format(date, "PP")}\nTime: ${format(date, "pp")}`,
- []
+ `✅ Dokploy Serverd Restarted\n\nDate: ${format(date, "PP")}\nTime: ${format(date, "pp")}`
);
}
diff --git a/packages/server/src/utils/notifications/utils.ts b/packages/server/src/utils/notifications/utils.ts
index 96301156..5e16c517 100644
--- a/packages/server/src/utils/notifications/utils.ts
+++ b/packages/server/src/utils/notifications/utils.ts
@@ -55,7 +55,7 @@ export const sendDiscordNotification = async (
export const sendTelegramNotification = async (
connection: typeof telegram.$inferInsert,
messageText: string,
- inlineButton: {
+ inlineButton?: {
text: string;
url: string;
}[][]