Commit 5330aafa authored by Patricio Bruna's avatar Patricio Bruna

Fixed code sintax and removed indent check from linter

parent bedfce6f
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
"consistent-this": [2, "self"], "consistent-this": [2, "self"],
"func-names": 2, "func-names": 2,
"func-style": [2, "declaration"], "func-style": [2, "declaration"],
"indent": [2, 4, {"SwitchCase": 0}], # "indent": [2, 2, {"SwitchCase": 0}],
"jsx-quotes": [2, "prefer-single"], "jsx-quotes": [2, "prefer-single"],
"key-spacing": [2, {"beforeColon": false, "afterColon": true}], "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"linebreak-style": 2, "linebreak-style": 2,
......
...@@ -592,39 +592,30 @@ export function getAllCos(success, error) { ...@@ -592,39 +592,30 @@ export function getAllCos(success, error) {
if (UserStore.isGlobalAdmin()) { if (UserStore.isGlobalAdmin()) {
zimbra.getAllCos((err, data) => { zimbra.getAllCos((err, data) => {
if (err) { if (err) {
const e = handleError('getAllCos', err); return error(handleError('getAllCos', err));
if (error) {
return error(e);
}
} }
return success(data); return success(data);
}); });
} else { } else {
const batchRequests = []; const batchRequests = [];
const plans_names = Object.keys(window.manager_config.plans); const planNames = Object.keys(window.manager_config.plans);
plans_names.forEach((plan) => { planNames.forEach((plan) => {
batchRequests.push(zimbra.getCos(plan)); batchRequests.push(zimbra.getCos(plan));
}); });
zimbra.makeBatchRequest(batchRequests, (err, data) => { zimbra.makeBatchRequest(batchRequests, (err, data) => {
if (err) { if (err) {
const e = handleError('getCos', err); return error(handleError('getCos', err));
if (error) {
return error(e);
}
} }
return success(data.GetCosResponse.map((r) => {return r.cos[0];})); const allCos = data.GetCosResponse.map((r) => {
return r.cos[0];
});
return success(allCos);
}); });
} }
}, },
(err) => { (err) => {
const e = handleError('getAllCos', err); return error(handleError('getAllCos', err));
if (error) {
return error(e);
}
return null;
} }
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment