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