updatePanelUser(userInfo: Object)

Requires:
@ray-js/ray≥1.5.40
import { health } from '@ray-js/ray';

const { updatePanelUser } = health;

// Promise usage
try {
  const res = await updatePanelUser({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Update panel user

Parameters

PropertyTypeRequiredDescription
Yes

Return Value

Type: Promise<boolean>

Valid Values

userInfo.type
ValueDescriptionSince
1--
2--
3--
6--
userInfo.sex
ValueDescriptionSince
0--
1--
userInfo.heightUnit
ValueDescriptionSince
cm--
inch--
userInfo.weightUnit
ValueDescriptionSince
kg--
lb--
st--
jin--

Examples

Basic usage

import { health } from '@ray-js/ray'

health.updatePanelUser({
  userInfo: {
    userId: 'user123',
    devId: 'vdevo169477319679442',
    type: 1,
    userName: 'Zhang San',
    sex: 0,
    birthday: 946656000000,
    height: 178,
    heightUnit: 'cm',
    weight: 72,
    weightUnit: 'kg',
    userType: 1,
  },
}).then((success) => {
  console.log('Update result:', success);
}).catch((error) => {
  console.error(error);
});