angular.module('reviewsService',[]).factory('Reviews',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'reviewspaging',data:filter});
		},
		getSelect:function(){
			
			return $http({method:'POST',
				headers:headers,
				url:url_server + 'reviews/getall',
				withCredentials: true});
			
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'reviews/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'reviews/'+id);
		},
		save:function(reviewsData){
			return $http({method:'POST',
							url:url_server+'reviews',
							data:reviewsData});
		},
		update:function(id, reviewsData){
			return $http.put(url_server+'reviews/'+id,reviewsData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'reviews/'+id);
		},
		getSelectFilter:function(){
			return $http({method:'POST',url:url_server + 'reviews/getallfilter',withCredentials: true});
		}
	};
});
