Пример #1
0
        public async Task <IActionResult> DownloadLogoAsync(ClanId clanId)
        {
            var clan = await _clanService.FindClanAsync(clanId);

            if (clan == null)
            {
                return(this.NotFound("Clan doesn't exist."));
            }

            var logo = await _clanService.DownloadLogoAsync(clan);

            if (logo.Length == 0)
            {
                return(this.NoContent());
            }

            return(this.File(logo, "application/octet-stream"));
        }