public async Task <IActionResult> Get() { var userId = Guid.Parse(this.User.Claims.Single(x => x.Type == "http://schemas.microsoft.com/identity/claims/objectidentifier").Value); var command = new GetFollowersQuery(userId); var followers = await this.mediator.Send(command); return(Ok(followers)); }
public async Task <IActionResult> GetFollowers([FromQuery] GuidRequest profile, CancellationToken cancellationToken) { var command = new GetFollowersQuery { User = profile }; var followers = await _mediator.Send(command, cancellationToken); return(Ok(followers)); }
public ActionResult Followers(GetFollowersQuery query) { return(IncJson(this.dispatcher.Query(query))); }