Skip to content

Commit

Permalink
Updated eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesús Ángel authored and havidarou committed Jul 26, 2018
1 parent f296447 commit b6dfa23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
"parser": "babel-eslint",
"rules": {
"node/exports-style": ["error", "module.exports"],
"semi": 2,
"semi": 0,
"no-console": 0,
"no-process-exit": 0,
"node/no-unpublished-require": 0,
"node/no-unsupported-features": 0,
"node/no-unsupported-features/es-syntax": 0,
"no-extra-boolean-cast": 0,
"no-cond-assign": 0
},
Expand Down
15 changes: 4 additions & 11 deletions public/services/resolves/settings-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,11 @@ export default ($rootScope, $location, $q, $window, testAPI, appState, genericRe
}
})
.catch(error => {

const apiNotFound = error && error.data && error.data.code && error.data.code === 3002 &&
typeof error.data.message === 'string' &&
!error.data.message.includes("Invalid 'wazuh-app-version' header");

appState.removeCurrentAPI();
if(!apiNotFound) {
errorHandler.handle(error,'Routes');
errorHandler.handle('Wazuh App: please add a new API.','Routes',true);
} else {
errorHandler.handle('It seems the selected API was deleted. Please insert a new one or select an existing valid one.','Routes',true);
}

errorHandler.handle(error,'Routes');
errorHandler.handle('Please insert a new Wazuh API or select an existing valid one.','Routes',true);

$location.search('_a', null);
$location.search('tab', 'api');
$location.path('/settings');
Expand Down

0 comments on commit b6dfa23

Please sign in to comment.