Parent: [d16a51] (diff)

Child: [9bb579] (diff)

Download this file

appService.js    37 lines (36 with data), 1.2 kB

 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
29
30
31
32
33
34
35
36
37
/*made by Miguel Rodrigues @ KBZ miguel.rodrigues@knowledgebiz.pt*/
angular.module('mainApp')
.factory('appService', function($http){
return {
postApp: function(data){
return $http.post('/api/vf-os-enabler/v0/register', JSON.stringify(data))
},
postAppRules: function(data){
return $http.post('/api/vf-os-enabler/v0/notification/rules/', JSON.stringify(data))
},
getAppNotifications: function(appid){
return $http.get('/api/vf-os-enabler/v0/getNotifications/'+appid)
},
getAppRules: function(appid){
return $http.get('/api/vf-os-enabler/v0/getRules/'+appid)
},
getRuleStatistics: function(rulesid){
return $http.get('/api/vf-os-enabler/v0/getStatistics/'+rulesid)
},
getListByDevId: function(developerid){
return $http.get('/api/vf-os-enabler/v0/getApps/'+developerid)
},
getAllRule: function(rulesid){
return $http.get('/api/vf-os-enabler/v0/getAllRule/'+rulesid)
},
deleteApp: function(appid){
return $http.delete('/api/vf-os-enabler/v0/app/'+appid)
},
deleteRule: function(rulesid){
return $http.delete('/api/vf-os-enabler/v0/rule/'+rulesid)
},
editRule: function(data){
return $http.put('/api/vf-os-enabler/v0/edit/', JSON.stringify(data))
}
}
})