Manages common avatar operations.

Hierarchy

  • AvatarManager

Implements

Constructors

Methods

  • Returns avatar link for user userId

    Parameters

    • userId: string

      User identifier.

    Returns Promise<[null | string, ValidationResult]>

  • Resets user's avatar to default image.

    Parameters

    • userId: string

      Identifier of a user to reset avatar for. Only users with administrator access can reset avatars for another users.

    Returns Promise<ValidationResult>

  • Stores avatar content and sets it as the current avatar, after that reissues current token in order to update links.

    Parameters

    • avatarContent: Blob | File

      Content of the new avatar.

    • userId: string

      Identifier of a user to set a new avatar for. Only users with administrator access can set avatars for another users.

    Returns Promise<ValidationResult>

Generated using TypeDoc