mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 18:18:04 +01:00
22 lines
511 B
JavaScript
22 lines
511 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.project')
|
|
.factory('ToggleProjectPublicityService', ToggleProjectPublicityService);
|
|
|
|
ToggleProjectPublicityService.$inject = ['$http'];
|
|
|
|
function ToggleProjectPublicityService($http) {
|
|
return toggleProjectPublicity;
|
|
function toggleProjectPublicity(projectId, isPublic) {
|
|
return $http
|
|
.put('/api/projects/' + projectId + '/publicity', {
|
|
'public': isPublic
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
})(); |