From cc3b902d1e359e8746285ead0f48f9bd7734003a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sun, 1 Mar 2026 14:20:08 -0600 Subject: [PATCH] feat: include project name in API response columns Added the 'name' column to the project API response structure to enhance the data returned for project queries. This change improves the clarity and usability of the API by ensuring that project names are included in the response, facilitating better data handling for clients. --- apps/dokploy/server/api/routers/project.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts index b026b6d2c..e270ee4b4 100644 --- a/apps/dokploy/server/api/routers/project.ts +++ b/apps/dokploy/server/api/routers/project.ts @@ -223,27 +223,34 @@ export const projectRouter = createTRPCRouter({ applications.applicationId, accessedServices, ), - with: { domains: true }, columns: { applicationId: true, + name: true, + applicationStatus: true, }, }, mariadb: { where: buildServiceFilter(mariadb.mariadbId, accessedServices), columns: { mariadbId: true, + name: true, + applicationStatus: true, }, }, mongo: { where: buildServiceFilter(mongo.mongoId, accessedServices), columns: { mongoId: true, + name: true, + applicationStatus: true, }, }, mysql: { where: buildServiceFilter(mysql.mysqlId, accessedServices), columns: { mysqlId: true, + name: true, + applicationStatus: true, }, }, postgres: { @@ -253,25 +260,31 @@ export const projectRouter = createTRPCRouter({ ), columns: { postgresId: true, + name: true, + applicationStatus: true, }, }, redis: { where: buildServiceFilter(redis.redisId, accessedServices), columns: { redisId: true, + name: true, + applicationStatus: true, }, }, compose: { where: buildServiceFilter(compose.composeId, accessedServices), - with: { domains: true }, columns: { composeId: true, + name: true, + composeStatus: true, }, }, }, columns: { environmentId: true, isDefault: true, + name: true, }, }, }, @@ -324,6 +337,7 @@ export const projectRouter = createTRPCRouter({ }, }, columns: { + name: true, environmentId: true, isDefault: true, },