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
92c0128f
Commit
92c0128f
authored
Apr 26, 2016
by
Patricio Bruna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This closes #5
parent
af3e5980
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
zimbra-admin-api.js
lib/zimbra-admin-api.js
+2
-1
zimbra-admin-api.js.map
lib/zimbra-admin-api.js.map
+1
-1
account.js
src/zimbra/account.js
+2
-1
test.js
test/js/spec/test.js
+2
-2
No files found.
lib/zimbra-admin-api.js
View file @
92c0128f
...
...
@@ -13813,7 +13813,8 @@ return /******/ (function(modules) { // webpackBootstrap
value: function getMailboxSize(callback) {
this.getMailbox(function (e, d) {
if (e) return callback(e);
return callback(null, d.size);
var size = d.size === undefined || d.size === null ? 0 : d.size;
return callback(null, size);
});
}
}, {
lib/zimbra-admin-api.js.map
View file @
92c0128f
This diff is collapsed.
Click to expand it.
src/zimbra/account.js
View file @
92c0128f
...
...
@@ -34,7 +34,8 @@ export default class Account extends Zimbra {
getMailboxSize
(
callback
)
{
this
.
getMailbox
(
function
(
e
,
d
){
if
(
e
)
return
callback
(
e
);
return
callback
(
null
,
d
.
size
);
const
size
=
(
d
.
size
===
undefined
||
d
.
size
===
null
)
?
0
:
d
.
size
;
return
callback
(
null
,
size
);
});
}
...
...
test/js/spec/test.js
View file @
92c0128f
...
...
@@ -282,7 +282,7 @@
it
(
'Should Get The Account Mailbox'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
api
.
getAccount
(
'
pbruna@itlinux.cl
'
,
function
(
err
,
data
){
api
.
getAccount
(
'
cos_basic_14@customer.dev
'
,
function
(
err
,
data
){
let
account
=
data
;
account
.
getMailbox
(
function
(
err
,
data
){
if
(
err
)
return
console
.
log
(
err
);
...
...
@@ -294,7 +294,7 @@
it
(
'Should Get The Account Mailbox Size'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
api
.
getAccount
(
'
pbruna@itlinux.cl
'
,
function
(
err
,
data
){
api
.
getAccount
(
'
cos_basic_14@customer.dev
'
,
function
(
err
,
data
){
let
account
=
data
;
account
.
getMailboxSize
(
function
(
err
,
data
){
if
(
err
)
return
console
.
log
(
err
);
...
...
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