-
Notifications
You must be signed in to change notification settings - Fork 3
/
model.js
28 lines (23 loc) · 1.03 KB
/
model.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var jobService = angular.module('jobService', ['ngResource']);
var base_url = "https://nmpi.hbpneuromorphic.eu/api/v2";
jobService.factory('jobService', ['$resource',
function($resource){
//return $resource( base_url + '/queue', {id:'@eId'}, {
return $resource( base_url + '/queue/:id/', { id: '@eId' }, {
get: { method: 'GET', params:{ format:'json' }, headers:{ 'Content-Type':'application/json' } },
post: { method: 'POST', params:{ format:'json' }, headers:{ 'Content-Type':'application/json' } }
});
}]);
var jobResults = angular.module('jobResults', ['ngResource']);
jobResults.factory('jobResults', ['$resource',
function($resource){
return $resource( base_url + '/results/:id/', { id:'@eId'}, {
get: {method: 'GET', params:{ format:'json' }, isArray: false },
});
}]);
// jobById.factory('jobById', ['$resource',
// function($resource){
// return $resource( base_url + '/results/:id/', { id:'@eId'}, {
// get: {method: 'GET', params:{ format:'json' }, isArray: false },
// }
// ]);