Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 public ActionResult Followers(GetFollowersQuery query)
 {
     return(IncJson(this.dispatcher.Query(query)));
 }