Open grtjn opened 7 years ago
I'm currently doing it like:
ctrl.clearData = function() { $http({ url: '/v1/search', method: 'DELETE', params: { collection: 'data' } }).then(function(response) { toast.success('Deleted'); $scope.$broadcast('refresh'); }, function(response) { toast.danger(response.data); }); };
but being able to leverage mlRest.deleteCollection('data').then(...) or such would be nicer..
mlRest.deleteCollection('data').then(...)
Fun extra, make them accept arrays too, and do a promise.all to wait for all to finish..
+1
I'm currently doing it like:
but being able to leverage
mlRest.deleteCollection('data').then(...)
or such would be nicer..