Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
49e8aeed
Commit
49e8aeed
authored
Apr 27, 2016
by
Patricio Bruna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test parseResponse with error true instead of null
parent
27a77ef7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
zimbra-admin-api.js
lib/zimbra-admin-api.js
+4
-1
zimbra-admin-api.js.map
lib/zimbra-admin-api.js.map
+1
-1
index.js
src/index.js
+3
-2
No files found.
lib/zimbra-admin-api.js
View file @
49e8aeed
...
...
@@ -286,7 +286,7 @@ return /******/ (function(modules) { // webpackBootstrap
var response_name = that.dictionary.resourceResponseName(resource);
var response_object = data.get()[request_data.response_name][response_name][0];
var result = that.dictionary.classFactory(resource, response_object, that);
return callback(
null
, result);
return callback(
true
, result);
}
// For requests that returns empty Object when Success
...
...
@@ -530,6 +530,8 @@ return /******/ (function(modules) { // webpackBootstrap
}, {
key: 'getGrants',
value: function getGrants(target_data, grantee_data, callback) {
var forBatch = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
var _dictionary$buildTarg3 = this.dictionary.buildTargetGrantee(target_data, grantee_data);
var _dictionary$buildTarg4 = (0, _slicedToArray3.default)(_dictionary$buildTarg3, 2);
...
...
@@ -542,6 +544,7 @@ return /******/ (function(modules) { // webpackBootstrap
request_data.parse_response = this.parseAllResponse;
request_data.params.params.grantee = grantee;
request_data.params.params.target = target;
if (forBatch) return request_data;
this.performRequest(request_data);
}
lib/zimbra-admin-api.js.map
View file @
49e8aeed
This diff is collapsed.
Click to expand it.
src/index.js
View file @
49e8aeed
...
...
@@ -177,7 +177,7 @@ export default class ZimbraAdminApi {
const
response_name
=
that
.
dictionary
.
resourceResponseName
(
resource
);
const
response_object
=
data
.
get
()[
request_data
.
response_name
][
response_name
][
0
];
const
result
=
that
.
dictionary
.
classFactory
(
resource
,
response_object
,
that
);
return
callback
(
null
,
result
);
return
callback
(
true
,
result
);
}
// For requests that returns empty Object when Success
...
...
@@ -368,13 +368,14 @@ export default class ZimbraAdminApi {
// type: (account|cos|dl|domain),
// identifier: (name or zimbraId)
// }
getGrants
(
target_data
,
grantee_data
,
callback
)
{
getGrants
(
target_data
,
grantee_data
,
callback
,
forBatch
=
false
)
{
const
[
target
,
grantee
]
=
this
.
dictionary
.
buildTargetGrantee
(
target_data
,
grantee_data
);
const
request_data
=
this
.
buildRequestData
(
'GetGrants'
,
callback
);
request_data
.
resource
=
'Grant'
;
request_data
.
parse_response
=
this
.
parseAllResponse
;
request_data
.
params
.
params
.
grantee
=
grantee
;
request_data
.
params
.
params
.
target
=
target
;
if
(
forBatch
)
return
request_data
;
this
.
performRequest
(
request_data
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment