feat: board slugs

This commit is contained in:
Henry
2025-01-05 16:21:11 +00:00
parent fa9be9d280
commit d98df1d2c6
13 changed files with 1795 additions and 60 deletions

View File

@@ -30,6 +30,7 @@ export const getByPublicId = async (
`
publicId,
name,
slug,
workspace (
publicId,
members:workspace_members (
@@ -151,14 +152,19 @@ export const create = async (
export const update = async (
db: SupabaseClient<Database>,
boardInput: { name: string; boardPublicId: string },
boardInput: {
name: string | undefined;
slug: string | undefined;
boardPublicId: string;
},
) => {
const { data } = await db
.from("board")
.update({ name: boardInput.name })
.update({ name: boardInput.name, slug: boardInput.slug })
.eq("publicId", boardInput.boardPublicId)
.select(`publicId, name`)
.limit(1)
.order("id", { ascending: false })
.single();
return data;

View File

@@ -123,6 +123,7 @@ export const getBySlugWithBoards = async (
slug,
boards: board (
publicId,
slug,
name
)
`,