angular.module('soundsService',[]).factory('Sounds',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'soundspaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'sounds/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'sounds/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'sounds/'+id);
		},
		save:function(soundsData){
			return $http({method:'POST',
							url:url_server+'sounds',
							data:soundsData});
		},
		update:function(id, soundsData){
			return $http.put(url_server+'sounds/'+id,soundsData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'sounds/'+id);
		}
	};
});
