OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/assets/javascripts/angular/services/status-service.js

27 lines
636 B

angular.module('openproject.services')
.service('StatusService', ['$http', 'PathHelper', function($http, PathHelper) {
var StatusService = {
getStatuses: function(projectIdentifier) {
var url;
if(projectIdentifier) {
url = PathHelper.apiProjectStatusesPath(projectIdentifier);
} else {
url = PathHelper.apiStatusesPath();
}
return StatusService.doQuery(url);
},
doQuery: function(url, params) {
return $http.get(url, { params: params })
.then(function(response){
return response.data.statuses;
});
}
};
return StatusService;
}]);