angular.module('newfeedtypesService',[]).factory('Newfeedtypes',function($http){
	
	return {
		getPaging:function(filter){
			return $http({method:'POST',
				headers:headers,
				url:url_server+'newfeedtypespaging',
				data:filter,
				withCredentials: true});
			// return $http({method:'POST',url:url_server + 'newfeedtypespaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'newfeedtypes/getall'});
		},
		newfeedtypesOnUser:function(){
			return $http({method:'POST',
				headers:headers,
				url:url_server+'newfeedtypes/newfeedtypesonuser',
				withCredentials: true});
			// return $http({method:'POST',url:url_server + 'newfeedtypes/newfeedtypesonuser'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'newfeedtypes/search',data:filter});
		},
		show:function(id){
			return $http({method:'GET',
				headers:headers,
				url:url_server+'newfeedtypes/'+id,
				withCredentials: true});
			// return $http.get(url_server+ 'newfeedtypes/'+id);
		},
		save:function(newfeedtypesData){
			return $http({method:'POST',
				headers:headers,
				url:url_server+'newfeedtypes',
				data:newfeedtypesData,
				withCredentials: true});
			// return $http({method:'POST',
			// 				url:url_server+'newfeedtypes',
			// 				data:newfeedtypesData});
		},
		update:function(id, newfeedtypesData){
			return $http.put(url_server+'newfeedtypes/'+id,newfeedtypesData,{headers:headers, withCredentials: true });
			// return $http.put(url_server+'newfeedtypes/'+id,newfeedtypesData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'newfeedtypes/'+id);
		}
	};
});
