Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(api): do not return deleted projects on public api (#10400)

Marc Klingen9316a0b07f93
diff --git a/web/src/ee/features/admin-api/server/projects.ts b/web/src/ee/features/admin-api/server/projects.ts
index 103b8b4370..6bebb16f7d 100644
--- a/web/src/ee/features/admin-api/server/projects.ts
+++ b/web/src/ee/features/admin-api/server/projects.ts
@@ -10,6 +10,7 @@ export async function handleGetProjects(
const projects = await prisma.project.findMany({
where: {
orgId,
+ deletedAt: null,
},
select: {
id: true,
diff --git a/web/src/pages/api/public/projects/[projectId]/index.ts b/web/src/pages/api/public/projects/[projectId]/index.ts
index 7fc75247bf..29700a762b 100644
--- a/web/src/pages/api/public/projects/[projectId]/index.ts
+++ b/web/src/pages/api/public/projects/[projectId]/index.ts
@@ -67,6 +67,7 @@ export default async function handler(
where: {
id: projectId,
orgId: authCheck.scope.orgId,
+ deletedAt: null,
},
});
diff --git a/web/src/pages/api/public/projects/index.ts b/web/src/pages/api/public/projects/index.ts
index 16c8d25ef0..79c29f5f0a 100644
--- a/web/src/pages/api/public/projects/index.ts
+++ b/web/src/pages/api/public/projects/index.ts
@@ -53,7 +53,7 @@ export default async function handler(
},
where: {
id: authCheck.scope.projectId,
- // deletedAt: null, // here we want to include deleted projects and grey them in the UI.
+ deletedAt: null,
},
});