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/api/hal-api-resource.js

21 lines
471 B

angular.module('openproject.api')
.factory('HALAPIResource', ['$q', 'PathHelper', function HALAPIResource($q, PathHelper) {
'use strict';
var HALAPIResource = {
configure: function() {
Hyperagent.configure('defer', $q.defer);
},
setup: function(uri) {
HALAPIResource.configure();
return new Hyperagent.Resource({
url: PathHelper.appBasePath + PathHelper.apiV3 + '/' + uri,
});
}
};
return HALAPIResource;
}]);