feat: set board visibility

This commit is contained in:
Henry
2025-01-18 22:41:28 +00:00
parent 3270038dbc
commit be57292c5e
5 changed files with 88 additions and 12 deletions

View File

@@ -31,6 +31,7 @@ export const getByPublicId = async (
publicId,
name,
slug,
visibility,
workspace (
publicId,
members:workspace_members (
@@ -222,12 +223,18 @@ export const update = async (
boardInput: {
name: string | undefined;
slug: string | undefined;
visibility: "public" | "private" | undefined;
boardPublicId: string;
},
) => {
const { data } = await db
.from("board")
.update({ name: boardInput.name, slug: boardInput.slug })
.update({
name: boardInput.name,
slug: boardInput.slug,
visibility: boardInput.visibility,
updatedAt: new Date().toISOString(),
})
.eq("publicId", boardInput.boardPublicId)
.select(`publicId, name`)
.limit(1)