예제 #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));
        }
예제 #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));
        }