mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Merge pull request #361 from Portabase/fix/delete-org
fix: org deletion
This commit is contained in:
@@ -47,7 +47,9 @@ export default async function RoutePage(props: PageParams<{ slug: string }>) {
|
||||
const organizationWithMembers = await db.query.organization.findFirst({
|
||||
where: eq(drizzleDb.schemas.organization.id, organization.id),
|
||||
with: {
|
||||
projects: true,
|
||||
projects: {
|
||||
where: eq(drizzleDb.schemas.project.isArchived, false),
|
||||
},
|
||||
members: {
|
||||
with: {
|
||||
user: true,
|
||||
|
||||
@@ -29,7 +29,7 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
if (!org) notFound();
|
||||
|
||||
const projects = await db.query.project.findMany({
|
||||
where: eq(drizzleDb.schemas.project.organizationId, org.id),
|
||||
where: and(eq(drizzleDb.schemas.project.organizationId, org.id), eq(drizzleDb.schemas.project.isArchived, false))
|
||||
});
|
||||
|
||||
const projectIds = projects.map(project => project.id);
|
||||
|
||||
Reference in New Issue
Block a user