예제 #1
0
        public async Task <IActionResult> UserProfile(string id)
        {
            //var scopes = HttpContext.User.FindFirst("http://schemas.microsoft.com/identity/claims/scope")?.Value;
            //if (!string.IsNullOrEmpty(Startup.ScopeRead) && scopes != null
            //                                             && scopes.Split(' ').Any(s => s.Equals(Startup.ScopeRead)))
            //{

            var result = await _userRepository.GetUserById(id);

            var user =
                new CurrentUserPublicProfile
            {
                User = result,
                //todo: implment calculating average
                UserAverageRating = 1,
                //todo: implement get totoal rating count
                RatingCount = 2,
                //todo: implment getting latestrating
                LatestRatings = new List <LatestRating>()
            };

            return(Ok(user));
            //}
            //else
            //{
            //    return Unauthorized();
            //}
        }
예제 #2
0
 public void EditUser(CurrentUserPublicProfile userprofile)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public void NewUser(CurrentUserPublicProfile user)
 {
     throw new NotImplementedException();
 }