mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-08 03:30:51 +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
|
|
});
|
|
}
|
|
}
|
|
})(); |