harbor/static/resources/js/services/destination/services.update-destination.js

24 lines
582 B
JavaScript
Raw Normal View History

(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
});
}
}
})();