Skip to content

Commit

Permalink
remove async setup funtion
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano committed Nov 7, 2022
1 parent 99c1930 commit b8530c7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ export class WazuhPlugin implements Plugin<WazuhSetup, WazuhStart, WazuhSetupPlu
private innerAngularInitialized: boolean = false;
private stateUpdater = new BehaviorSubject<AppUpdater>(() => ({}));
private hideTelemetryBanner?: () => void;
public async setup(core: CoreSetup, plugins: WazuhSetupPlugins): WazuhSetup {

public async logoInitialStateFunction(core: CoreSetup){
const logosInitialState = await core.http.get('/api/logos');
return logosInitialState;
}

public setup(core: CoreSetup, plugins: WazuhSetupPlugins): WazuhSetup {
const UI_THEME = core.uiSettings.get('theme:darkMode') ? 'dark' : 'light';

// Get custom logos configuration to start up the app with the correct logos
let logosInitialState={};
try{
logosInitialState = await core.http.get(`/api/logos`);
logosInitialState = this.logoInitialStateFunction(core);
}
catch(error){
console.error('plugin.ts: Error getting logos configuration', error);
Expand Down

0 comments on commit b8530c7

Please sign in to comment.