|
@@ -0,0 +1,35 @@
|
|
1
|
+/**
|
|
2
|
+ * Created by robin on 11/1/15.
|
|
3
|
+ */
|
|
4
|
+
|
|
5
|
+(function () {
|
|
6
|
+ 'use strict';
|
|
7
|
+ angular.module('luticateAuth')
|
|
8
|
+ .factory('luticateAuthGroups', ['luticateRequest',
|
|
9
|
+ function(luticateRequest) {
|
|
10
|
+
|
|
11
|
+ var luticateAuthGroups = {};
|
|
12
|
+
|
|
13
|
+ luticateAuthGroups.getAll = function(data, promise)
|
|
14
|
+ {
|
|
15
|
+ return luticateRequest.get("/api/luticate/groups", data, promise);
|
|
16
|
+ };
|
|
17
|
+
|
|
18
|
+ luticateAuthGroups.edit = function(data, promise)
|
|
19
|
+ {
|
|
20
|
+ return luticateRequest.post("/api/luticate/groups/" + data.user_id + "/edit", data, null, promise);
|
|
21
|
+ };
|
|
22
|
+
|
|
23
|
+ luticateAuthGroups.add = function(data, promise)
|
|
24
|
+ {
|
|
25
|
+ return luticateRequest.post("/api/luticate/groups/add", data, null, promise);
|
|
26
|
+ };
|
|
27
|
+
|
|
28
|
+ luticateAuthGroups.del = function(data, promise)
|
|
29
|
+ {
|
|
30
|
+ return luticateRequest.post("/api/luticate/groups/" + data.user_id + "/del", null, null, promise);
|
|
31
|
+ };
|
|
32
|
+
|
|
33
|
+ return luticateAuthGroups;
|
|
34
|
+ }]);
|
|
35
|
+})();
|