harbor/static/ng/resources/js/services/project-member/services.edit-project-member.js

24 lines
538 B
JavaScript
Raw Normal View History

(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) ]
});
}
}
})();