mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 15:48:26 +01:00
23 lines
587 B
JavaScript
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
|
|
});
|
|
}
|
|
}
|
|
})(); |