public HttpResponseMessage DeleteVote(int id)
        {
            TriaCulturaRepository.removeVote(id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK);

            return(response);
        }
        public HttpResponseMessage GetVotes_for_user(int user_id)
        {
            var votes = TriaCulturaRepository.GetVotes(user_id, true);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, votes);

            return(response);
        }
        public HttpResponseMessage PostNewVote(int user_id, int project_id)
        {
            var vote = TriaCulturaRepository.postVote(user_id, project_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, vote);

            return(response);
        }
        public HttpResponseMessage GetProjects_for_place(int place_id)
        {
            var places = TriaCulturaRepository.GetProjectes(place_id, true);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, places);

            return(response);
        }
        public HttpResponseMessage getProject(int project_id)
        {
            var project = TriaCulturaRepository.getProjectById(project_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, project);

            return(response);
        }
        public HttpResponseMessage getvotedprojects(int user_id)
        {
            var requests = TriaCulturaRepository.getVotedProjects(user_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, requests);

            return(response);
        }
        public HttpResponseMessage PutNewPass([FromBody] user u)
        {
            var user = TriaCulturaRepository.ChangeUsr(u);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, user);

            return(response);
        }
        public HttpResponseMessage GetUserRating_for_project(int user_id, int project_id)
        {
            var rating = TriaCulturaRepository.getRatingsWhereAuthor(user_id, project_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, rating);

            return(response);
        }
        public HttpResponseMessage PutUserRating_for_project([FromBody] rating r)
        {
            var rating = TriaCulturaRepository.putRating(r);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, rating);

            return(response);
        }
        public HttpResponseMessage GetAuthor_for_Project(int project_id)
        {
            var author = TriaCulturaRepository.getAuthorWhereProject(project_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, author);

            return(response);
        }
        public HttpResponseMessage GetProject_avg_rating(int project_id)
        {
            var avg_rating = TriaCulturaRepository.getCountRating(project_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, avg_rating);

            return(response);
        }
        public HttpResponseMessage GetUser_by_dni(string dni)
        {
            var user = TriaCulturaRepository.GetUser(dni, true);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, user);

            return(response);
        }
        public HttpResponseMessage GetSingleFile(int file_id)
        {
            var file = TriaCulturaRepository.getSingleFile(file_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, file);

            return(response);
        }
        public HttpResponseMessage GetFiles_for_Project(int project_id)
        {
            var files = TriaCulturaRepository.getfiles(project_id, false);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, files);

            return(response);
        }
        public HttpResponseMessage GetWinningRequests()
        {
            var requests = TriaCulturaRepository.getAllRequest(true);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, requests);

            return(response);
        }
        public HttpResponseMessage GetCountVotes(int proj_id)
        {
            var qnt = TriaCulturaRepository.count_votes(proj_id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, qnt);

            return(response);
        }