mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-03 15:43:39 +01:00
25 lines
553 B
JavaScript
25 lines
553 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.project.member')
|
|
.factory('AddProjectMemberService', AddProjectMemberService);
|
|
|
|
AddProjectMemberService.$inject = ['$http', '$log'];
|
|
|
|
function AddProjectMemberService($http, $log) {
|
|
|
|
return AddProjectMember;
|
|
|
|
function AddProjectMember(projectId, roles, username) {
|
|
return $http
|
|
.post('/api/projects/' + projectId + '/members/', {
|
|
'roles': [ Number(roles) ],
|
|
'username': username
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
})(); |