fix: update public board lookup to filter by workspace slug

This commit is contained in:
Henry
2025-07-28 22:21:52 +01:00
parent ca1dd92ab4
commit 28d2de4dad
3 changed files with 35 additions and 6 deletions

View File

@@ -201,6 +201,7 @@ export const getByPublicId = async (
export const getBySlug = async (
db: dbClient,
boardSlug: string,
workspaceId: number,
filters: {
members: string[];
labels: string[];
@@ -293,6 +294,7 @@ export const getBySlug = async (
},
where: and(
eq(boards.slug, boardSlug),
eq(boards.workspaceId, workspaceId),
isNull(boards.deletedAt),
eq(boards.visibility, "public"),
),