mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-08 19:50:05 +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
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
})(); |