Ejemplo n.º 1
0
        public async Task <IActionResult> GetAsync()
        {
            var user = await _workContext.GetUserAsync();

            var repoUser = _uow.GetRepository <IUserRepository>();
            var info     = await repoUser.FindUserInfoByIdAsync(user.Id);

            var model = new ProfileModel
            {
                Email       = user.Email,
                PhoneNumber = user.PhoneNumber,
                FullName    = info.FullName,
                AvatarPath  = info.AvatarPath
            };

            return(Ok(model));
        }