mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-28 05:05:19 +01:00
24 lines
556 B
JavaScript
24 lines
556 B
JavaScript
(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
|
|
});
|
|
}
|
|
}
|
|
|
|
})() |