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

23 lines
481 B
JavaScript
Raw Normal View History

(function() {
'use strict';
angular
.module('harbor.services.project')
.factory('AddProjectService', AddProjectService);
AddProjectService.$inject = ['$http', '$log'];
function AddProjectService($http, $log) {
return AddProject;
2016-05-01 19:46:50 +02:00
function AddProject(projectName, isPublic) {
return $http
.post('/api/projects', {
'project_name': projectName,
'public': isPublic
});
}
}
})();