public static async Task <ProposalsModel> GetAsync(RepoInfo repo)
        {
            var mapModel = await MapModel.GetAsync(repo);

            var answer = new ProposalsModel();

            if (mapModel.Proposals != null)
            {
                foreach (var proposal in mapModel.Proposals)
                {
                    answer.Proposals.Add(new ProposalModel(proposal.Id, repo)
                    {
                        Title = proposal.Title
                    });
                }
            }

            return(answer);
        }
Ejemplo n.º 2
0
        public static async Task <ProposalModel> GetAsync(RepoInfo repo, string id)
        {
            var proposalsModel = await ProposalsModel.GetAsync(repo);

            return(proposalsModel.Proposals?.FirstOrDefault(i => i.Id == id));
        }