harbor/static/resources/js/services/repository/services.delete-repository.js

22 lines
560 B
JavaScript
Raw Normal View History

(function() {
'use strict';
angular
.module('harbor.services.repository')
.factory('DeleteRepositoryService', DeleteRepositoryService);
DeleteRepositoryService.$inject = ['$http', '$log'];
function DeleteRepositoryService($http, $log) {
return DeleteRepository;
function DeleteRepository(repoName, tag) {
var params = (tag === '') ? {'repo_name' : repoName} : {'repo_name': repoName, 'tag': tag};
return $http
.delete('/api/repositories', {
'params': params
});
}
}
})();