Hey there, I have a question regarding the `upsert...
# javascript
x
Hey there, I have a question regarding the
upsert
function. On signin/signup on my app I want to store a few personal data of my user, i do it with
Copy code
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?