# Class UsersController | EchoHub Documentation

# Class UsersController

Namespace
  EchoHub.Server.Controllers

Assembly
  EchoHub.Server.dll

    [ApiController]
    [Route("api/users")]
    [Authorize]
    [EnableRateLimiting("general")]
    public class UsersController : ControllerBase

Inheritance
  object
  ControllerBase
  UsersController

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### UsersController(EchoHubDbContext, ImageToAsciiService)

    public UsersController(EchoHubDbContext db, ImageToAsciiService asciiService)

#### Parameters

`db` EchoHubDbContext
`asciiService` ImageToAsciiService

## Methods

### GetProfile(string)

    [HttpGet("{username}/profile")]
    public Task<IActionResult> GetProfile(string username)

#### Parameters

`username` string

#### Returns

Task<IActionResult>

### UpdateProfile(UpdateProfileRequest)

    [HttpPut("profile")]
    public Task<IActionResult> UpdateProfile(UpdateProfileRequest request)

#### Parameters

`request` UpdateProfileRequest

#### Returns

Task<IActionResult>

### UploadAvatar()

    [HttpPost("avatar")]
    [EnableRateLimiting("upload")]
    public Task<IActionResult> UploadAvatar()

#### Returns

Task<IActionResult>