From 6ecc4ecac25d87248f28602571e6ccdf110c1565 Mon Sep 17 00:00:00 2001 From: Jeong Daseul <98886223+goodaseul@users.noreply.github.com> Date: Mon, 19 Jan 2026 20:09:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8B=A8=EC=96=B4=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=8B=9C=20=EB=A9=94=EB=AA=A8=20=EB=B9=88=EC=B9=B8=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/words.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/words.ts b/src/api/words.ts index 494b3a2..17dcceb 100644 --- a/src/api/words.ts +++ b/src/api/words.ts @@ -101,6 +101,11 @@ export async function uploadWords(word: WordCreateInput) { if (!user) { throw new Error("Unauthorized"); } + + const { memo, ...uploadData } = word; + + const normalizedMemo = memo !== undefined && memo.trim() === "" ? null : memo; + const { data: existingWord } = await supabase .from("words") .select("id, expression") @@ -120,6 +125,7 @@ export async function uploadWords(word: WordCreateInput) { .from("words") .insert({ ...word, + memo: normalizedMemo, user_id: user.id, bookmarked: word.bookmarked ?? false, })