public async Task <IActionResult> AddUserAvatar([FromRoute] string username, IFormFile userAvatarImage)
        {
            var userRole        = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "Role").Value.ToString();
            var userNameFromJwt = HttpContext.User.Claims.FirstOrDefault(x => x.Type == "UserName").Value.ToString();

            if (userRole == "admin" || userNameFromJwt == username)
            {
                if (userAvatarImage == null)
                {
                    return(BadRequest("File is null"));
                }

                if (CheckImage(userAvatarImage) == false)
                {
                    return(BadRequest("Image does not meet the conditions"));
                }


                byte[] avatar = null;
                using (var fs = userAvatarImage.OpenReadStream())
                    using (var ms = new MemoryStream())
                    {
                        fs.CopyTo(ms);
                        avatar = ms.ToArray();
                    }

                var response = await _clientDataService.AddAvatarToUserAsync(username, avatar);

                if (response.Success == false)
                {
                    return(BadRequest(response.ErrorsMessages));
                }

                return(Ok(response));
            }
            else
            {
                return(Forbid());
            }
        }