updateUserInfo()

Syntax

updateUserInfo(data: DataUpdateUserInfo)

Update user information like email or username.

Parameters

NameTypeRequiredDescription

data

DataUpdateUserInfo

Yes

Data to update.

interface DataUpdateUserInfo {
   email: string;
   name_tag: string;
}

Example

import { updateUserInfo } from "@eueno/lib-browser";

const updateUserData = async () => {
   try {
     const data = {
       email: “newEmail@gmail.com”,
       name_tag: “new_username”,
     };

     const response = await updateUserInfo(data);

     console.log(response);
   } catch (error) {
     console.log(error);
   }
 };

Response of example:

{
    "status": 200,
    "msg": "success"
}

Last updated