Join Discord
Powered by
How can I update data in JSONB from a textarea inp...
# help
j
joshcowan25
01/30/2022, 8:15 PM
How can I update data in JSONB from a textarea input (The stringify version of that same JSONB)... Everytime I try, Nothing is saved...
joshcowan25
01/30/2022, 8:15 PM
export async function updateThisSetting(ligne){ const { data, error } = await supabase .from("settings") .update({"value": ligne.value}) .eq('key', ligne.key) console.log(error) return {data, error} }
joshcowan25
01/30/2022, 8:15 PM
I call it from
joshcowan25
01/30/2022, 8:15 PM
async function modifier(elem){ const {data, error} = await updateThisSetting(elem) }
joshcowan25
01/30/2022, 8:16 PM
And elem/ligne contains a key and a value field
Previous
Next