/// <summary>
        /// Get the User details of the currently loggedin user. It will also get the Users List info and the Payment histories if the user is admin
        /// </summary>
        /// <returns>User details</returns>
        public async Task <UserDetailWithPaymentHistory> GetUserDetails()
        {
            var userDetail = new UserDetailWithPaymentHistory();

            //Get the User details
            userDetail.User = await _userClient.GetUserInfo();

            //If User is Admin
            if (userDetail.User.Admin)
            {
                //Get the users list
                userDetail.Users = await _accountApplicationService.GetAccountUserList(userDetail.User.Account[0].AccountID);
            }

            return(userDetail);
        }
Example #2
0
 public async Task <IHttpActionResult> GetAccountUserList(long AccountID)
 {
     return(Ok(await _accountApplicationService.GetAccountUserList(AccountID)));
 }