Exemple #1
0
 private void SetImageLinks(User user)
 {
     if (user.Avatar != null)
     {
         user.Avatar = ImageLink.GetUserAvatarLink(user.Id);
     }
 }
Exemple #2
0
        public BaseResponse <User> Get()
        {
            BaseResponse <User> response = null;

            try
            {
                int  userId = int.Parse(Request.Query["userId"]);
                User user   = userRepository.Get(userId);
                user = user.Clone();

                user.Token  = null;
                user.Avatar = ImageLink.GetUserAvatarLink(user.Id);
                response    = new BaseResponse <User>(user);
            }
            catch (Exception ex)
            {
                response = new BaseResponse <User> {
                    Error = ex.Message
                };
            }
            return(response);
        }