mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-12 13:35:00 +01:00
24 lines
538 B
JavaScript
24 lines
538 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.project.member')
|
|
.factory('EditProjectMemberService', EditProjectMemberService);
|
|
|
|
EditProjectMemberService.$inject = ['$http', '$log'];
|
|
|
|
function EditProjectMemberService($http, $log) {
|
|
|
|
return EditProjectMember;
|
|
|
|
function EditProjectMember(projectId, userId, roleId) {
|
|
return $http
|
|
.put('/api/projects/' + projectId + '/members/' + userId, {
|
|
'roles' : [ Number(roleId) ]
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
})(); |