mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 10:38:00 +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
|
|
});
|
|
}
|
|
}
|
|
|
|
})() |