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

24 lines
556 B
JavaScript
Raw Normal View History

(function() {
'use strict';
angular
.module('harbor.services.destination')
.factory('CreateDestinationService', CreateDestinationService);
CreateDestinationService.$inject = ['$http'];
function CreateDestinationService($http) {
return createDestination;
function createDestination(name, endpoint, username, password) {
return $http
.post('/api/targets', {
'name': name,
'endpoint': endpoint,
'username': username,
'password': password
});
}
}
})()