mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-27 02:58: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
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
})(); |