xavier
07/21/2022, 6:46 PMupsert
function.
On signin/signup on my app I want to store a few personal data of my user, i do it with
const { data: user, error } = await supabase.from('user_data').upsert({
first_name: data.firstName.localized.en_US,
last_name: data.localizedLastName,
profile_pic: avatarURL,
access_token: token
});
I used an upsert
to insert a new row if the user doesn't exist, update a row otherwise. But it doesn't works, the current code add a new row on each new signin.
What am I missing?