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

23 lines
587 B
JavaScript

(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};
console.log(params);
return $http
.delete('/api/repositories', {
'params': params
});
}
}
})();