Exemple #1
0
        public async Task <IActionResult> FetchMembersAsync(ClanId clanId)
        {
            var clan = await _clanService.FindClanAsync(clanId);

            if (clan == null)
            {
                return(this.NotFound("Clan not found."));
            }

            var members = await _clanService.FetchMembersAsync(clan);

            if (!members.Any())
            {
                return(this.NoContent());
            }

            return(this.Ok(_mapper.Map <IEnumerable <MemberDto> >(members)));
        }