Skip to content

Commit 75dc4c4

Browse files
committed
fix: remove unnecessary console logs and improve error handling in module services
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 19286ce commit 75dc4c4

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

frontend/src/app/app-module/app-module-view/app-module-view.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export class AppModuleViewComponent implements OnInit, OnDestroy {
9292
return res.body ? res.body.sort((a, b) => a > b ? 1 : -1) : [];
9393
}),
9494
catchError(error => {
95-
console.log(error);
9695
this.utmToastService.showError('Failed to fetch categories',
9796
'An error occurred while fetching module data.');
9897
return of([]);
@@ -116,14 +115,12 @@ export class AppModuleViewComponent implements OnInit, OnDestroy {
116115
}
117116

118117
filterByCategory($event: any) {
119-
console.log('filter');
120118
this.req['moduleCategory.equals'] = $event;
121119
this.refreshModules();
122120

123121
}
124122

125123
onSearch($event: string) {
126-
console.log('search');
127124
this.req.page = 0;
128125
this.req['prettyName.contains'] = $event;
129126
this.refreshModules();

frontend/src/app/app-module/services/module.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export class ModuleService {
4040
}),
4141
shareReplay(1),
4242
catchError(error => {
43-
console.error(error);
4443
this.utmToastService.showError(
4544
'Failed to fetch servers',
4645
'An error occurred while fetching server list.'
@@ -84,7 +83,7 @@ export class ModuleService {
8483
m.prettyName = m.prettyName + ' GravityZone';
8584
}
8685
});
87-
return response.body.filter(m => m.moduleName !== this.utmModulesEnum.AS_400);
86+
return response.body;
8887
}),
8988
catchError(error => {
9089
console.error(error);

0 commit comments

Comments
 (0)