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

25 lines
553 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) ],
'username': username
2016-04-27 12:29:55 +02:00
});
}
}
})();