|
24 | 24 |
|
25 | 25 | query : function(query) { |
26 | 26 | return $http({ |
27 | | - url : BackendConfig.url + '/kong/consumers', |
| 27 | + url : 'kong/consumers', |
28 | 28 | method: "GET", |
29 | 29 | params : query |
30 | 30 | }) |
31 | 31 | }, |
32 | 32 |
|
33 | 33 | findById : function(id) { |
34 | 34 | return $http({ |
35 | | - url : BackendConfig.url + '/kong/consumers/' + id, |
| 35 | + url : 'kong/consumers/' + id, |
36 | 36 | method: "GET" |
37 | 37 | }) |
38 | 38 | }, |
|
42 | 42 | }, |
43 | 43 |
|
44 | 44 | create : function(consumer) { |
45 | | - return $http.post(BackendConfig.url + '/kong/consumers',clean(consumer)) |
| 45 | + return $http.post('kong/consumers',clean(consumer)) |
46 | 46 | }, |
47 | 47 |
|
48 | 48 | update : function(id,data) { |
49 | | - return $http.patch(BackendConfig.url + '/kong/consumers/' + id,data) |
| 49 | + return $http.patch('kong/consumers/' + id,data) |
50 | 50 | }, |
51 | 51 |
|
52 | 52 | delete : function(consumer) { |
53 | | - return $http.delete(BackendConfig.url + '/kong/consumers/' + consumer.id) |
| 53 | + return $http.delete('kong/consumers/' + consumer.id) |
54 | 54 | }, |
55 | 55 |
|
56 | 56 | fetchAcls : function(consumerId) { |
57 | | - return $http.get(BackendConfig.url + '/kong/consumers/' + consumerId + '/acls') |
| 57 | + return $http.get('kong/consumers/' + consumerId + '/acls') |
58 | 58 | }, |
59 | 59 |
|
60 | 60 | addAcl : function(consumerId,data) { |
61 | | - return $http.post(BackendConfig.url + '/kong/consumers/' + consumerId + '/acls',data) |
| 61 | + return $http.post('kong/consumers/' + consumerId + '/acls',data) |
62 | 62 | }, |
63 | 63 |
|
64 | 64 | deleteAcl : function(consumerId,groupId) { |
65 | | - return $http.delete(BackendConfig.url + '/kong/consumers/' + consumerId + '/acls/' + groupId) |
| 65 | + return $http.delete('kong/consumers/' + consumerId + '/acls/' + groupId) |
66 | 66 | }, |
67 | 67 |
|
68 | 68 | addCredential : function(consumerId,credential,data) { |
69 | | - return $http.post(BackendConfig.url + '/kong/consumers/' + consumerId + '/' + credential,data) |
| 69 | + return $http.post('kong/consumers/' + consumerId + '/' + credential,data) |
70 | 70 | }, |
71 | 71 |
|
72 | 72 | loadCredentials : function(consumerId,credential) { |
73 | | - return $http.get(BackendConfig.url + '/kong/consumers/' + consumerId + '/' + credential) |
| 73 | + return $http.get('kong/consumers/' + consumerId + '/' + credential) |
74 | 74 | }, |
75 | 75 |
|
76 | 76 | listCredentials : function(consumerId) { |
77 | | - return $http.get(BackendConfig.url + '/kong/consumers/' + consumerId + '/credentials') |
| 77 | + return $http.get('kong/consumers/' + consumerId + '/credentials') |
78 | 78 | }, |
79 | 79 |
|
80 | 80 | removeCredential : function(consumerId,credential,credential_id) { |
81 | | - return $http.delete(BackendConfig.url + '/kong/consumers/' + consumerId + '/' + credential + '/' + credential_id) |
| 81 | + return $http.delete('kong/consumers/' + consumerId + '/' + credential + '/' + credential_id) |
82 | 82 | }, |
83 | 83 | } |
84 | 84 | } |
|
0 commit comments