@cpod/sdk - v0.2.7
    Preparing search index...

    Function updateUserById

    • Update a user by ID (admin only)

      Parameters

      • userId: string

        The unique identifier of the user to update

      • data: UpdateUserRequest

        User data to update (name, email, role, etc.)

      Returns Promise<User>

      The updated user object

      400 - Invalid user data

      401 - Not authenticated

      403 - Admin privileges required

      404 - User not found

      import { updateUserById } from "@cpod/sdk";

      const updatedUser = await updateUserById("user-123", {
      name: "Jane Doe",
      role: "admin",
      });
      console.log(`Updated user: ${updatedUser.name}`);