mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-08 03:30:51 +01:00
24 lines
582 B
JavaScript
24 lines
582 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.destination')
|
|
.factory('UpdateDestinationService', UpdateDestinationService);
|
|
|
|
UpdateDestinationService.$inject = ['$http'];
|
|
|
|
function UpdateDestinationService($http) {
|
|
return updateDestination;
|
|
function updateDestination(targetId, target) {
|
|
return $http
|
|
.put('/api/targets/' + targetId, {
|
|
'name': target.name,
|
|
'endpoint': target.endpoint,
|
|
'username': target.username,
|
|
'password': target.password
|
|
});
|
|
}
|
|
}
|
|
|
|
})(); |