mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-02 23:23:45 +01:00
24 lines
640 B
JavaScript
24 lines
640 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.replication.policy')
|
|
.factory('UpdateReplicationPolicyService', UpdateReplicationPolicyService);
|
|
|
|
UpdateReplicationPolicyService.$inject = ['$http'];
|
|
|
|
function UpdateReplicationPolicyService($http) {
|
|
return updateReplicationPolicy;
|
|
function updateReplicationPolicy(policyId, policy) {
|
|
return $http
|
|
.put('/api/policies/replication/' + policyId, {
|
|
'name': policy.name,
|
|
'description': policy.description,
|
|
'enabled': policy.enabled,
|
|
'target_id': policy.targetId
|
|
});
|
|
}
|
|
}
|
|
|
|
})(); |