From c51d63a4df8816b27dedc3ce913fa6710ac0efbf Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 1 Mar 2025 22:21:03 -0600 Subject: [PATCH] chore: remove TODO comments and clean up code annotations --- apps/dokploy/components/dashboard/project/add-database.tsx | 1 - apps/dokploy/server/api/routers/notification.ts | 7 ------- apps/dokploy/server/api/routers/ssh-key.ts | 1 - packages/server/src/db/schema/application.ts | 1 - packages/server/src/services/domain.ts | 1 - 5 files changed, 11 deletions(-) diff --git a/apps/dokploy/components/dashboard/project/add-database.tsx b/apps/dokploy/components/dashboard/project/add-database.tsx index cd75ba468..b14e2cfa0 100644 --- a/apps/dokploy/components/dashboard/project/add-database.tsx +++ b/apps/dokploy/components/dashboard/project/add-database.tsx @@ -48,7 +48,6 @@ import { z } from "zod"; type DbType = typeof mySchema._type.type; -// TODO: Change to a real docker images const dockerImageDefaultPlaceholder: Record = { mongo: "mongo:6", mariadb: "mariadb:11", diff --git a/apps/dokploy/server/api/routers/notification.ts b/apps/dokploy/server/api/routers/notification.ts index 48ef50b9d..23283d971 100644 --- a/apps/dokploy/server/api/routers/notification.ts +++ b/apps/dokploy/server/api/routers/notification.ts @@ -51,7 +51,6 @@ import { TRPCError } from "@trpc/server"; import { desc, eq, sql } from "drizzle-orm"; import { z } from "zod"; -// TODO: Uncomment the validations when is cloud ready export const notificationRouter = createTRPCRouter({ createSlack: adminProcedure .input(apiCreateSlack) @@ -75,7 +74,6 @@ export const notificationRouter = createTRPCRouter({ try { const notification = await findNotificationById(input.notificationId); if (notification.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to update this notification", @@ -129,7 +127,6 @@ export const notificationRouter = createTRPCRouter({ try { const notification = await findNotificationById(input.notificationId); if (notification.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to update this notification", @@ -184,7 +181,6 @@ export const notificationRouter = createTRPCRouter({ try { const notification = await findNotificationById(input.notificationId); if (notification.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to update this notification", @@ -247,7 +243,6 @@ export const notificationRouter = createTRPCRouter({ try { const notification = await findNotificationById(input.notificationId); if (notification.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to update this notification", @@ -289,7 +284,6 @@ export const notificationRouter = createTRPCRouter({ try { const notification = await findNotificationById(input.notificationId); if (notification.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to delete this notification", @@ -312,7 +306,6 @@ export const notificationRouter = createTRPCRouter({ .query(async ({ input, ctx }) => { const notification = await findNotificationById(input.notificationId); if (notification.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to access this notification", diff --git a/apps/dokploy/server/api/routers/ssh-key.ts b/apps/dokploy/server/api/routers/ssh-key.ts index fe321de4f..4663af8f2 100644 --- a/apps/dokploy/server/api/routers/ssh-key.ts +++ b/apps/dokploy/server/api/routers/ssh-key.ts @@ -41,7 +41,6 @@ export const sshRouter = createTRPCRouter({ try { const sshKey = await findSSHKeyById(input.sshKeyId); if (sshKey.organizationId !== ctx.session.activeOrganizationId) { - // TODO: Remove isCloud in the next versions of dokploy throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not allowed to delete this SSH key", diff --git a/packages/server/src/db/schema/application.ts b/packages/server/src/db/schema/application.ts index 2437f59d6..e670e2e24 100644 --- a/packages/server/src/db/schema/application.ts +++ b/packages/server/src/db/schema/application.ts @@ -44,7 +44,6 @@ export const buildType = pgEnum("buildType", [ "static", ]); -// TODO: refactor this types export interface HealthCheckSwarm { Test?: string[] | undefined; Interval?: number | undefined; diff --git a/packages/server/src/services/domain.ts b/packages/server/src/services/domain.ts index fe068fc22..d2e23c06b 100644 --- a/packages/server/src/services/domain.ts +++ b/packages/server/src/services/domain.ts @@ -126,7 +126,6 @@ export const updateDomainById = async ( export const removeDomainById = async (domainId: string) => { await findDomainById(domainId); - // TODO: fix order const result = await db .delete(domains) .where(eq(domains.domainId, domainId))