public GetAllBranchesForUserResponse Map(IEnumerable <Backend.Branch> branchesOwnedByUser, User user)
        {
            var mappedBranches = MapBranches(branchesOwnedByUser);
            var mappedUser     = MapUser(user);

            return(GetAllBranchesForUserResponse.Create(mappedUser, mappedBranches));
        }
Ejemplo n.º 2
0
        public async Task <GetAllBranchesForUserResponse> GetBranchInformationForUserAsync(string gitUserId)
        {
            var response = await branchRetriever.RetrieveOwnerById(gitUserId);

            if (response.Successful)
            {
                return(GetAllBranchesForUserResponse.Invalid());
            }

            return(GetAllBranchesForUserResponse.Create(response.User, response.Branches));
        }