Skip to content

Commit cc3b902

Browse files
committed
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.
1 parent 6c1f237 commit cc3b902

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

apps/dokploy/server/api/routers/project.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,27 +223,34 @@ export const projectRouter = createTRPCRouter({
223223
applications.applicationId,
224224
accessedServices,
225225
),
226-
with: { domains: true },
227226
columns: {
228227
applicationId: true,
228+
name: true,
229+
applicationStatus: true,
229230
},
230231
},
231232
mariadb: {
232233
where: buildServiceFilter(mariadb.mariadbId, accessedServices),
233234
columns: {
234235
mariadbId: true,
236+
name: true,
237+
applicationStatus: true,
235238
},
236239
},
237240
mongo: {
238241
where: buildServiceFilter(mongo.mongoId, accessedServices),
239242
columns: {
240243
mongoId: true,
244+
name: true,
245+
applicationStatus: true,
241246
},
242247
},
243248
mysql: {
244249
where: buildServiceFilter(mysql.mysqlId, accessedServices),
245250
columns: {
246251
mysqlId: true,
252+
name: true,
253+
applicationStatus: true,
247254
},
248255
},
249256
postgres: {
@@ -253,25 +260,31 @@ export const projectRouter = createTRPCRouter({
253260
),
254261
columns: {
255262
postgresId: true,
263+
name: true,
264+
applicationStatus: true,
256265
},
257266
},
258267
redis: {
259268
where: buildServiceFilter(redis.redisId, accessedServices),
260269
columns: {
261270
redisId: true,
271+
name: true,
272+
applicationStatus: true,
262273
},
263274
},
264275
compose: {
265276
where: buildServiceFilter(compose.composeId, accessedServices),
266-
with: { domains: true },
267277
columns: {
268278
composeId: true,
279+
name: true,
280+
composeStatus: true,
269281
},
270282
},
271283
},
272284
columns: {
273285
environmentId: true,
274286
isDefault: true,
287+
name: true,
275288
},
276289
},
277290
},
@@ -324,6 +337,7 @@ export const projectRouter = createTRPCRouter({
324337
},
325338
},
326339
columns: {
340+
name: true,
327341
environmentId: true,
328342
isDefault: true,
329343
},

0 commit comments

Comments
 (0)