add dropdown link

This commit is contained in:
Lorenzo Migliorero
2024-10-03 15:27:48 +02:00
parent 9b255964fe
commit 21ee22d4f5
2 changed files with 93 additions and 9 deletions

View File

@@ -125,6 +125,7 @@ export const projectRouter = createTRPCRouter({
applications.applicationId,
accesedServices,
),
with: { domains: true },
},
mariadb: {
where: buildServiceFilter(mariadb.mariadbId, accesedServices),
@@ -143,6 +144,7 @@ export const projectRouter = createTRPCRouter({
},
compose: {
where: buildServiceFilter(compose.composeId, accesedServices),
with: { domains: true },
},
},
orderBy: desc(projects.createdAt),
@@ -153,13 +155,21 @@ export const projectRouter = createTRPCRouter({
return await db.query.projects.findMany({
with: {
applications: true,
applications: {
with: {
domains: true,
},
},
mariadb: true,
mongo: true,
mysql: true,
postgres: true,
redis: true,
compose: true,
compose: {
with: {
domains: true,
},
},
},
where: eq(projects.adminId, ctx.user.adminId),
orderBy: desc(projects.createdAt),