2016-04-13 12:55:05 +02:00
|
|
|
(function() {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular
|
2016-04-21 12:19:51 +02:00
|
|
|
.module('harbor.services.project.member')
|
2016-04-13 12:55:05 +02:00
|
|
|
.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) ],
|
2016-06-17 09:22:58 +02:00
|
|
|
'username': username
|
2016-04-27 12:29:55 +02:00
|
|
|
});
|
2016-04-13 12:55:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})();
|