public HttpResponseMessage Close(CloseVotacaoViewModel votacao)
 {
     VotacaoServices.EncerraVotacao(votacao);
     return(Request.CreateResponse(HttpStatusCode.OK, new DescriptionMessage(HttpStatusCode.OK, "Closed", $"You closed the event #{votacao.Evento}")));
 }
예제 #2
0
        public HttpResponseMessage Get(int evt)
        {
            var votacao = VotacaoServices.RecuperaVotacao(evt);

            return(Request.CreateResponse(HttpStatusCode.OK, votacao));
        }
 public HttpResponseMessage Vote(AddVotoViewModel vote)
 {
     VotacaoServices.CriaVoto(vote);
     return(Request.CreateResponse(HttpStatusCode.Created, new DescriptionMessage(HttpStatusCode.Created, "You have voted", "Thanks for your vote")));
 }