Modern React Template - v0.0.10
    Preparing search index...

    Function updateUser

    • Example: Update a user

      Updates user information with validation.

      Parameters

      • userId: string

        UUID of the user to update

      • data: { email: string; name: string }

        Updated user data (name and email)

      Returns Promise<unknown>

      Promise resolving to the updated user

      If userId format is invalid

      If name or email is missing

      If the request fails or validation fails

      const user = await updateUser('550e8400-e29b-41d4-a716-446655440000', {
      name: 'Jane Smith',
      email: 'jane.smith@example.com'
      });