public void MakeChangePermissionsLine(string appointer, string appointed, int storeID, int[] permissions) { Permission permission = new Permission(permissions); ChangePermissionsRequest req = new ChangePermissionsRequest(appointer, appointed, storeID, permission); string json = JsonConvert.SerializeObject(req); lines.Add(json); }
public byte[] HandleChangePermissions(string json) { ChangePermissionsRequest res = JsonConvert.DeserializeObject <ChangePermissionsRequest>(json); Tuple <bool, string> ans = appointService.ChangePermissions(res.Owner, res.Appoint, res.StoreId, res.Permissions.ToArray()); string jsonAns = Seralize(new SuccessFailResponse(ans.Item1, ans.Item2)); return(security.Encrypt(jsonAns)); }