|
@@ -7,26 +7,26 @@
|
7
|
7
|
angular.module('luticateUtils')
|
8
|
8
|
.factory('luticateRequest', ['$q', '$http', 'luticatePromises', function ($q, $http, luticatePromises) {
|
9
|
9
|
|
10
|
|
- var coPlanningServices = {};
|
|
10
|
+ var luticateRequest = {};
|
11
|
11
|
|
12
|
|
- coPlanningServices.get = function(url, dataGet, promise)
|
|
12
|
+ luticateRequest.get = function(url, dataGet, promise)
|
13
|
13
|
{
|
14
|
|
- return coPlanningServices.request(url, 'GET', dataGet, null, promise);
|
|
14
|
+ return luticateRequest.request(url, 'GET', dataGet, null, promise);
|
15
|
15
|
};
|
16
|
16
|
|
17
|
|
- coPlanningServices.post = function(url, dataPost, dataGet, promise)
|
|
17
|
+ luticateRequest.post = function(url, dataPost, dataGet, promise)
|
18
|
18
|
{
|
19
|
|
- return coPlanningServices.request(url, 'POST', dataGet, dataPost, promise);
|
|
19
|
+ return luticateRequest.request(url, 'POST', dataGet, dataPost, promise);
|
20
|
20
|
};
|
21
|
21
|
|
22
|
|
- coPlanningServices.put = function(url, dataPost, dataGet, promise)
|
|
22
|
+ luticateRequest.put = function(url, dataPost, dataGet, promise)
|
23
|
23
|
{
|
24
|
|
- return coPlanningServices.request(url, 'PUT', dataGet, dataPost, promise);
|
|
24
|
+ return luticateRequest.request(url, 'PUT', dataGet, dataPost, promise);
|
25
|
25
|
};
|
26
|
26
|
|
27
|
|
- coPlanningServices.delete = function(url, dataPost, dataGet, promise)
|
|
27
|
+ luticateRequest.delete = function(url, dataPost, dataGet, promise)
|
28
|
28
|
{
|
29
|
|
- return coPlanningServices.request(url, 'DELETE', dataGet, dataPost, promise);
|
|
29
|
+ return luticateRequest.request(url, 'DELETE', dataGet, dataPost, promise);
|
30
|
30
|
};
|
31
|
31
|
|
32
|
32
|
function reject(defered, data, status, promise)
|
|
@@ -49,7 +49,7 @@
|
49
|
49
|
}
|
50
|
50
|
}
|
51
|
51
|
|
52
|
|
- coPlanningServices.request = function(url, method, dataGet, dataPost, promise)
|
|
52
|
+ luticateRequest.request = function(url, method, dataGet, dataPost, promise)
|
53
|
53
|
{
|
54
|
54
|
if (promise != null) {
|
55
|
55
|
luticatePromises.initPromise(promise);
|
|
@@ -86,6 +86,6 @@
|
86
|
86
|
return defered.promise;
|
87
|
87
|
};
|
88
|
88
|
|
89
|
|
- return coPlanningServices;
|
|
89
|
+ return luticateRequest;
|
90
|
90
|
}]);
|
91
|
91
|
})();
|