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

25 lines
554 B
JavaScript
Raw Normal View History

(function() {
'use strict';
angular
.module('harbor.services.project.member')
.factory('AddProjectMemberService', AddProjectMemberService);
AddProjectMemberService.$inject = ['$http', '$log'];
function AddProjectMemberService($http, $log) {
return AddProjectMember;
2016-04-27 12:29:55 +02:00
function AddProjectMember(projectId, roles, username) {
return $http
.post('/api/projects/' + projectId + '/members/', {
'roles': [ Number(roles) ],
'user_name': username
});
}
}
})();