From 736c186a666aac8f16022605ae59d3031f9c6d67 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:46:05 -0600 Subject: [PATCH] fix(notifications): adjust types --- server/api/routers/backup.ts | 1 - server/api/routers/settings.ts | 2 +- server/utils/backups/mariadb.ts | 1 + server/utils/backups/mongo.ts | 1 + server/utils/backups/mysql.ts | 1 + server/utils/backups/postgres.ts | 1 + 6 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/api/routers/backup.ts b/server/api/routers/backup.ts index 2a79ccf5..7e84a8a8 100644 --- a/server/api/routers/backup.ts +++ b/server/api/routers/backup.ts @@ -23,7 +23,6 @@ import { import { findMariadbByBackupId } from "../services/mariadb"; import { findMongoByBackupId } from "../services/mongo"; import { findMySqlByBackupId } from "../services/mysql"; -import { sendDatabaseBackupNotifications } from "../services/notification"; import { findPostgresByBackupId } from "../services/postgres"; export const backupRouter = createTRPCRouter({ diff --git a/server/api/routers/settings.ts b/server/api/routers/settings.ts index 7749c8bf..19299c11 100644 --- a/server/api/routers/settings.ts +++ b/server/api/routers/settings.ts @@ -17,6 +17,7 @@ import { stopService, } from "@/server/utils/docker/utils"; import { recreateDirectory } from "@/server/utils/filesystem/directory"; +import { sendDockerCleanupNotifications } from "@/server/utils/notifications/docker-cleanup"; import { spawnAsync } from "@/server/utils/process/spawnAsync"; import { readConfig, @@ -35,7 +36,6 @@ import { TRPCError } from "@trpc/server"; import { scheduleJob, scheduledJobs } from "node-schedule"; import { appRouter } from "../root"; import { findAdmin, updateAdmin } from "../services/admin"; -import { sendDockerCleanupNotifications } from "../services/notification"; import { getDokployImage, getDokployVersion, diff --git a/server/utils/backups/mariadb.ts b/server/utils/backups/mariadb.ts index 9277b225..39278fb3 100644 --- a/server/utils/backups/mariadb.ts +++ b/server/utils/backups/mariadb.ts @@ -48,6 +48,7 @@ export const runMariadbBackup = async ( projectName: project.name, databaseType: "mariadb", type: "error", + // @ts-ignore errorMessage: error?.message || "Error message not provided", }); throw error; diff --git a/server/utils/backups/mongo.ts b/server/utils/backups/mongo.ts index 1329b4f4..15f0e897 100644 --- a/server/utils/backups/mongo.ts +++ b/server/utils/backups/mongo.ts @@ -44,6 +44,7 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { projectName: project.name, databaseType: "mongodb", type: "error", + // @ts-ignore errorMessage: error?.message || "Error message not provided", }); throw error; diff --git a/server/utils/backups/mysql.ts b/server/utils/backups/mysql.ts index e662dbe1..4d4801fa 100644 --- a/server/utils/backups/mysql.ts +++ b/server/utils/backups/mysql.ts @@ -45,6 +45,7 @@ export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { projectName: project.name, databaseType: "mysql", type: "error", + // @ts-ignore errorMessage: error?.message || "Error message not provided", }); throw error; diff --git a/server/utils/backups/postgres.ts b/server/utils/backups/postgres.ts index 5c435a9b..ec7af81f 100644 --- a/server/utils/backups/postgres.ts +++ b/server/utils/backups/postgres.ts @@ -45,6 +45,7 @@ export const runPostgresBackup = async ( projectName: project.name, databaseType: "postgres", type: "error", + // @ts-ignore errorMessage: error?.message || "Error message not provided", });