Ejemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <Request> > > GetProposals()
        {
            string res = User.Claims.First(x => x.Type == "FreelancerId").Value;

            int freelancerId = int.Parse(res);

            var proposals = await proposalService.GetProposalsByFreelancerIdAsync(freelancerId);

            if (proposalService == null)
            {
                return(NotFound("No proposals found"));
            }

            return(Ok(proposals));
        }