fix: update board and workspace slug queries to filter by visibility
This commit is contained in:
@@ -287,7 +287,11 @@ export const getBySlug = async (
|
||||
orderBy: [asc(lists.index)],
|
||||
},
|
||||
},
|
||||
where: and(eq(boards.slug, boardSlug), isNull(boards.deletedAt)),
|
||||
where: and(
|
||||
eq(boards.slug, boardSlug),
|
||||
isNull(boards.deletedAt),
|
||||
eq(boards.visibility, "public"),
|
||||
),
|
||||
});
|
||||
|
||||
if (!board) return null;
|
||||
|
||||
@@ -145,7 +145,7 @@ export const getBySlugWithBoards = (db: dbClient, workspaceSlug: string) => {
|
||||
slug: true,
|
||||
name: true,
|
||||
},
|
||||
where: isNull(boards.deletedAt),
|
||||
where: and(isNull(boards.deletedAt), eq(boards.visibility, "public")),
|
||||
},
|
||||
},
|
||||
where: and(
|
||||
|
||||
Reference in New Issue
Block a user