From a86fe46b7b570b3e32963fa4b48f8a44a2ce3ce7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Feb 2026 05:54:23 +0000 Subject: [PATCH] Fix variable naming in database routers Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com> --- apps/dokploy/server/api/routers/mariadb.ts | 8 ++++---- apps/dokploy/server/api/routers/mysql.ts | 8 ++++---- apps/dokploy/server/api/routers/redis.ts | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/dokploy/server/api/routers/mariadb.ts b/apps/dokploy/server/api/routers/mariadb.ts index b52b737a5..1f58eec1b 100644 --- a/apps/dokploy/server/api/routers/mariadb.ts +++ b/apps/dokploy/server/api/routers/mariadb.ts @@ -163,9 +163,9 @@ export const mariadbRouter = createTRPCRouter({ saveExternalPort: protectedProcedure .input(apiSaveExternalPortMariaDB) .mutation(async ({ input, ctx }) => { - const mongo = await findMariadbById(input.mariadbId); + const mariadb = await findMariadbById(input.mariadbId); if ( - mongo.environment.project.organizationId !== + mariadb.environment.project.organizationId !== ctx.session.activeOrganizationId ) { throw new TRPCError({ @@ -177,7 +177,7 @@ export const mariadbRouter = createTRPCRouter({ if (input.externalPort) { const portCheck = await checkPortInUse( input.externalPort, - mongo.serverId || undefined, + mariadb.serverId || undefined, ); if (portCheck.isInUse) { throw new TRPCError({ @@ -191,7 +191,7 @@ export const mariadbRouter = createTRPCRouter({ externalPort: input.externalPort, }); await deployMariadb(input.mariadbId); - return mongo; + return mariadb; }), deploy: protectedProcedure .input(apiDeployMariaDB) diff --git a/apps/dokploy/server/api/routers/mysql.ts b/apps/dokploy/server/api/routers/mysql.ts index ffbf9c593..9af93b556 100644 --- a/apps/dokploy/server/api/routers/mysql.ts +++ b/apps/dokploy/server/api/routers/mysql.ts @@ -178,9 +178,9 @@ export const mysqlRouter = createTRPCRouter({ saveExternalPort: protectedProcedure .input(apiSaveExternalPortMySql) .mutation(async ({ input, ctx }) => { - const mongo = await findMySqlById(input.mysqlId); + const mysql = await findMySqlById(input.mysqlId); if ( - mongo.environment.project.organizationId !== + mysql.environment.project.organizationId !== ctx.session.activeOrganizationId ) { throw new TRPCError({ @@ -192,7 +192,7 @@ export const mysqlRouter = createTRPCRouter({ if (input.externalPort) { const portCheck = await checkPortInUse( input.externalPort, - mongo.serverId || undefined, + mysql.serverId || undefined, ); if (portCheck.isInUse) { throw new TRPCError({ @@ -206,7 +206,7 @@ export const mysqlRouter = createTRPCRouter({ externalPort: input.externalPort, }); await deployMySql(input.mysqlId); - return mongo; + return mysql; }), deploy: protectedProcedure .input(apiDeployMySql) diff --git a/apps/dokploy/server/api/routers/redis.ts b/apps/dokploy/server/api/routers/redis.ts index 0f09ae0dd..a5cc7c9aa 100644 --- a/apps/dokploy/server/api/routers/redis.ts +++ b/apps/dokploy/server/api/routers/redis.ts @@ -202,9 +202,9 @@ export const redisRouter = createTRPCRouter({ saveExternalPort: protectedProcedure .input(apiSaveExternalPortRedis) .mutation(async ({ input, ctx }) => { - const mongo = await findRedisById(input.redisId); + const redis = await findRedisById(input.redisId); if ( - mongo.environment.project.organizationId !== + redis.environment.project.organizationId !== ctx.session.activeOrganizationId ) { throw new TRPCError({ @@ -216,7 +216,7 @@ export const redisRouter = createTRPCRouter({ if (input.externalPort) { const portCheck = await checkPortInUse( input.externalPort, - mongo.serverId || undefined, + redis.serverId || undefined, ); if (portCheck.isInUse) { throw new TRPCError({ @@ -230,7 +230,7 @@ export const redisRouter = createTRPCRouter({ externalPort: input.externalPort, }); await deployRedis(input.redisId); - return mongo; + return redis; }), deploy: protectedProcedure .input(apiDeployRedis)