1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Updating user in supabase updates and ovefrride all fields or just applied fields?

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 7, 2024 às 03:43.

  1. Stack

    Stack Membro Participativo

    assuming my data of user looks like this:

    interface SignUpObject {
    email:string,
    password: string,
    options: {
    emailRedirectTo: string,
    captchaToken?: string,
    data: {
    preferedLanguage: number
    name: string
    email: string
    agreeTermsCheckbox: boolean
    whatJobYouHave: number
    birthday: string
    subscriber_expiration_timestamp: string | null
    }
    }
    }


    if i update user options with only one param, lets say the "name" field, does it override everything?

    here's an update example

    const { data, error } = await supabase.auth.updateUser({
    options: {
    name: 'test new name'
    }
    })

    Continue reading...

Compartilhe esta Página