mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-07 16:37:55 +01:00
21 lines
537 B
JavaScript
21 lines
537 B
JavaScript
|
(function() {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
angular
|
||
|
.module('harbor.services.replication.policy')
|
||
|
.factory('ToggleReplicationPolicyService', ToggleReplicationPolicyService);
|
||
|
|
||
|
ToggleReplicationPolicyService.$inject = ['$http'];
|
||
|
|
||
|
function ToggleReplicationPolicyService($http) {
|
||
|
return toggleReplicationPolicy;
|
||
|
function toggleReplicationPolicy(policyId, enabled) {
|
||
|
return $http
|
||
|
.put('/api/policies/replication/' + policyId + '/enablement', {
|
||
|
'enabled': enabled
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
})();
|