瀏覽代碼

groups

tags/0.1.0
Robin Thoni 9 年之前
父節點
當前提交
67560042af
共有 1 個文件被更改,包括 35 次插入0 次删除
  1. 35
    0
      src/groups.js

+ 35
- 0
src/groups.js 查看文件

@@ -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
+})();

Loading…
取消
儲存