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
07e7622d
Commit
07e7622d
authored
May 24, 2016
by
Patricio Bruna
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #95 from ZBoxApp/companies_token_87
Companies token 87
parents
ec3c99ca
a14c7432
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
.gitignore
.gitignore
+1
-0
path.json
path.json
+1
-1
client.jsx
src/utils/client.jsx
+11
-0
No files found.
.gitignore
View file @
07e7622d
...
@@ -5,6 +5,7 @@ dist
...
@@ -5,6 +5,7 @@ dist
src/config
src/config
node_modules
node_modules
/path.json
/path.json
./path.json
.npminstall
.npminstall
ncp-debug.log
ncp-debug.log
npm-debug.log
npm-debug.log
...
...
path.json
View file @
07e7622d
module.exports
=
{
"main"
:{
"js"
:
"/531271bundle.js"
}}
module.exports
=
{
"main"
:{
"js"
:
"/516290bundle.js"
}}
\ No newline at end of file
\ No newline at end of file
src/utils/client.jsx
View file @
07e7622d
...
@@ -47,6 +47,7 @@ function initZimbra() {
...
@@ -47,6 +47,7 @@ function initZimbra() {
if
(
zimbra
&&
token
)
{
if
(
zimbra
&&
token
)
{
window
.
manager_config
.
dns
.
token
=
token
;
window
.
manager_config
.
dns
.
token
=
token
;
window
.
manager_config
.
user_token
=
token
;
return
resolve
(
zimbra
);
return
resolve
(
zimbra
);
}
else
if
(
token
)
{
}
else
if
(
token
)
{
zimbra
=
new
ZimbraAdminApi
({
zimbra
=
new
ZimbraAdminApi
({
...
@@ -55,6 +56,7 @@ function initZimbra() {
...
@@ -55,6 +56,7 @@ function initZimbra() {
zimbra
.
client
.
token
=
token
;
zimbra
.
client
.
token
=
token
;
ZimbraStore
.
setCurrent
(
zimbra
);
ZimbraStore
.
setCurrent
(
zimbra
);
window
.
manager_config
.
dns
.
token
=
token
;
window
.
manager_config
.
dns
.
token
=
token
;
window
.
manager_config
.
user_token
=
token
;
return
resolve
(
zimbra
);
return
resolve
(
zimbra
);
}
}
...
@@ -154,6 +156,9 @@ export function getAllCompanies() {
...
@@ -154,6 +156,9 @@ export function getAllCompanies() {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
$
.
ajax
({
return
$
.
ajax
({
url
,
url
,
beforeSend
:
function
setApiToken
(
xhrObj
)
{
xhrObj
.
setRequestHeader
(
'x-api-token'
,
window
.
manager_config
.
user_token
);
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
onSuccess
(
data
)
{
success
:
function
onSuccess
(
data
)
{
resolve
(
data
);
resolve
(
data
);
...
@@ -170,6 +175,9 @@ export function getCompany(id, success, error) {
...
@@ -170,6 +175,9 @@ export function getCompany(id, success, error) {
return
$
.
ajax
({
return
$
.
ajax
({
url
,
url
,
beforeSend
:
function
setApiToken
(
xhrObj
)
{
xhrObj
.
setRequestHeader
(
'x-api-token'
,
window
.
manager_config
.
user_token
);
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
onSuccess
(
data
)
{
success
:
function
onSuccess
(
data
)
{
success
(
data
);
success
(
data
);
...
@@ -185,6 +193,9 @@ export function getInvoices(id, success, error) {
...
@@ -185,6 +193,9 @@ export function getInvoices(id, success, error) {
return
$
.
ajax
({
return
$
.
ajax
({
url
,
url
,
beforeSend
:
function
setApiToken
(
xhrObj
)
{
xhrObj
.
setRequestHeader
(
'x-api-token'
,
window
.
manager_config
.
user_token
);
},
dataType
:
'json'
,
dataType
:
'json'
,
success
,
success
,
error
:
function
onError
(
xhr
,
status
,
err
)
{
error
:
function
onError
(
xhr
,
status
,
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