Ejemplo n.º 1
0
        public virtual async Task <IActionResult> GetProfile(string link)
        {
            int?userId = User?.UserId;

            var rez = await profilePresenter.GetProfileAsync(link, userId);

            if (rez == null)
            {
                return(NotFound());
            }

            return(Json(rez));
        }
Ejemplo n.º 2
0
        public virtual async Task <IActionResult> GetProfile(string link)
        {
            int?userId = User?.UserId;

            ProfileView profileView = await profilePresenter.GetProfileAsync(link, userId);

            if (profileView == null)
            {
                return(NotFound());
            }

            profileView.ProfileVisitsCount += profilesVisitsCounterService.CountProfile(UserOrIpKey, profileView.Id);

            return(Json(profileView));
        }