1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /**
- * Created by robin on 11/1/15.
- */
-
- (function () {
- 'use strict';
- angular.module('luticateAuth')
- .factory('luticateAuthGroups', ['luticateRequest',
- function(luticateRequest) {
-
- var luticateAuthGroups = {};
-
- luticateAuthGroups.getAll = function(data, promise)
- {
- return luticateRequest.get("/api/luticate/groups", data, promise);
- };
-
- luticateAuthGroups.edit = function(data, promise)
- {
- return luticateRequest.post("/api/luticate/groups/" + data.group_id + "/edit", data, null, promise);
- };
-
- luticateAuthGroups.add = function(data, promise)
- {
- return luticateRequest.post("/api/luticate/groups/add", data, null, promise);
- };
-
- luticateAuthGroups.del = function(data, promise)
- {
- return luticateRequest.post("/api/luticate/groups/" + data.group_id + "/del", null, null, promise);
- };
-
- luticateAuthGroups.usersGetAll= function(data, promise)
- {
- return luticateRequest.get("/api/luticate/groups/" + data.group_id + "/users",
- data, promise);
- };
-
- luticateAuthGroups.usersAdd = function(data, promise)
- {
- return luticateRequest.post("/api/luticate/groups/" + data.group_id + "/users/"
- + data.user_id + "/add", data, null, promise);
- };
-
- luticateAuthGroups.usersDel = function(data, promise)
- {
- return luticateRequest.post("/api/luticate/groups/" + data.group_id + "/users/"
- + data.user_id + "/del", data, null, promise);
- };
-
- return luticateAuthGroups;
- }]);
- })();
|