feat: update display name

This commit is contained in:
Henry
2025-02-01 11:37:16 +00:00
parent bee45aab3f
commit e321aa2f5d
9 changed files with 120 additions and 4 deletions

View File

@@ -48,13 +48,13 @@ export const create = async (
export const update = async (
db: SupabaseClient<Database>,
userId: string,
updates: { image: string | null },
updates: { image?: string; name?: string },
) => {
const { data } = await db
.from("user")
.update({ image: updates.image })
.update({ image: updates.image, name: updates.name })
.eq("id", userId)
.select(`image`)
.select(`image, name`)
.single();
return data;