mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-08 19:50:05 +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
|
|
});
|
|
}
|
|
}
|
|
|
|
})(); |