mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-08 19:50:05 +01:00
22 lines
560 B
JavaScript
22 lines
560 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};
|
|
return $http
|
|
.delete('/api/repositories', {
|
|
'params': params
|
|
});
|
|
}
|
|
}
|
|
})(); |