mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(dokploy): add missing project
This commit is contained in:
@@ -132,16 +132,20 @@ export const projectRouter = createTRPCRouter({
|
|||||||
if (accesedProjects.length === 0) {
|
if (accesedProjects.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const query = await db.query.projects.findMany({
|
const query = await db.query.projects.findMany({
|
||||||
where: sql`${projects.projectId} IN (${sql.join(
|
where: and(
|
||||||
accesedProjects.map((projectId) => sql`${projectId}`),
|
sql`${projects.projectId} IN (${sql.join(
|
||||||
sql`, `,
|
accesedProjects.map((projectId) => sql`${projectId}`),
|
||||||
)})`,
|
sql`, `,
|
||||||
|
)})`,
|
||||||
|
eq(projects.adminId, ctx.user.adminId),
|
||||||
|
),
|
||||||
with: {
|
with: {
|
||||||
applications: {
|
applications: {
|
||||||
where: and(
|
where: buildServiceFilter(
|
||||||
buildServiceFilter(applications.applicationId, accesedServices),
|
applications.applicationId,
|
||||||
eq(projects.adminId, ctx.user.adminId),
|
accesedServices,
|
||||||
),
|
),
|
||||||
with: { domains: true },
|
with: { domains: true },
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user