From 5a8f9cf2b86cdec0d3412b895354dc243507f3b5 Mon Sep 17 00:00:00 2001 From: Odalys Adam Date: Fri, 10 Nov 2023 20:05:34 +0100 Subject: [PATCH] remove most console.log & make rest console.error --- .../file-description/FileDescription.unit.ts | 2 -- src/main.ts | 2 +- src/pages/ActivationCode.page.vue | 2 +- src/pages/NewsCreate.page.vue | 1 - src/pages/NewsEdit.page.vue | 2 -- .../administration/StudentOverview.page.vue | 1 - src/plugins/polyfills.js | 2 -- src/store/collaborative-files.ts | 4 ++-- src/store/context-external-tools.ts | 14 -------------- src/store/group.ts | 4 ---- src/store/rooms.ts | 1 - src/store/school-external-tools.ts | 14 -------------- src/store/user-login-migrations.ts | 17 ----------------- 13 files changed, 4 insertions(+), 62 deletions(-) diff --git a/src/components/feature-board-file-element/content/display/file-description/FileDescription.unit.ts b/src/components/feature-board-file-element/content/display/file-description/FileDescription.unit.ts index cecbd417bc..52993f5d40 100644 --- a/src/components/feature-board-file-element/content/display/file-description/FileDescription.unit.ts +++ b/src/components/feature-board-file-element/content/display/file-description/FileDescription.unit.ts @@ -116,7 +116,6 @@ describe("FileDescription", () => { showTitle: true, src, }); - console.log(wrapper.html()); const link = wrapper.find("a"); expect(link.attributes("href")).toBe(src); @@ -206,7 +205,6 @@ describe("FileDescription", () => { showTitle: true, src, }); - console.log(wrapper.html()); const link = wrapper.find("a"); expect(link.attributes("href")).toBe(src); diff --git a/src/main.ts b/src/main.ts index d61922524c..a6e40cabac 100644 --- a/src/main.ts +++ b/src/main.ts @@ -126,7 +126,7 @@ Vue.use(VueDOMPurifyHTML, { try { await authModule.login(jwt); } catch (e) { - console.log("### JWT invalid: ", e); + console.error("### JWT invalid: ", e); } } diff --git a/src/pages/ActivationCode.page.vue b/src/pages/ActivationCode.page.vue index 35ce57e45d..e00c77052a 100644 --- a/src/pages/ActivationCode.page.vue +++ b/src/pages/ActivationCode.page.vue @@ -89,7 +89,7 @@ export default { this.keyword = this.data[0].keyword; this.activated = this.data[0].success; } catch (e) { - console.log(e); + console.error(e); } this.showModal = true; }, diff --git a/src/pages/NewsCreate.page.vue b/src/pages/NewsCreate.page.vue index a4aec99dd0..95476ccc15 100644 --- a/src/pages/NewsCreate.page.vue +++ b/src/pages/NewsCreate.page.vue @@ -70,7 +70,6 @@ export default { }); } } catch (e) { - console.error(e); notifierModule.show({ text: this.$t("components.organisms.FormNews.errors.create"), status: "error", diff --git a/src/pages/NewsEdit.page.vue b/src/pages/NewsEdit.page.vue index 0f6da39fe3..429f4dc95c 100644 --- a/src/pages/NewsEdit.page.vue +++ b/src/pages/NewsEdit.page.vue @@ -79,7 +79,6 @@ export default { path: `/news/${this.news.id}`, }); } catch (e) { - console.error(e); notifierModule.show({ text: this.$t("components.organisms.FormNews.errors.patch"), status: "error", @@ -97,7 +96,6 @@ export default { }); this.$router.push({ name: "news" }); } catch (e) { - console.error(e); notifierModule.show({ text: this.$t("components.organisms.FormNews.errors.remove"), status: "error", diff --git a/src/pages/administration/StudentOverview.page.vue b/src/pages/administration/StudentOverview.page.vue index 7fec331bda..925faa4197 100644 --- a/src/pages/administration/StudentOverview.page.vue +++ b/src/pages/administration/StudentOverview.page.vue @@ -551,7 +551,6 @@ export default { }); } } catch (error) { - console.error(error); notifierModule.show({ text: this.$tc("pages.administration.sendMail.error", rowIds.length), status: "error", diff --git a/src/plugins/polyfills.js b/src/plugins/polyfills.js index fafb1d8587..366fcde8d5 100644 --- a/src/plugins/polyfills.js +++ b/src/plugins/polyfills.js @@ -11,5 +11,3 @@ polyfill({ // full-type website, see https://github.com/timruffles/mobile-drag-drop/issues/167 for more forceApply: true, }); - -// console.log("mobileDragAndDrop loaded", polyfill); diff --git a/src/store/collaborative-files.ts b/src/store/collaborative-files.ts index cf1137f3b1..41e461e6cc 100644 --- a/src/store/collaborative-files.ts +++ b/src/store/collaborative-files.ts @@ -106,7 +106,7 @@ export default class CollaborativeFilesModule extends VuexModule { await this.addFileMetaData(data); this.setLoading(false); } catch (error: any) { - console.log(error); + console.error(error); this.setLoading(false); } } @@ -141,7 +141,7 @@ export default class CollaborativeFilesModule extends VuexModule { await this.addFileMetaData(data); this.setLoading(false); } catch (error: any) { - console.log(error); + console.error(error); this.setLoading(false); } } diff --git a/src/store/context-external-tools.ts b/src/store/context-external-tools.ts index 3b3793ccfa..fed30f2500 100644 --- a/src/store/context-external-tools.ts +++ b/src/store/context-external-tools.ts @@ -136,8 +136,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -179,8 +177,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -215,8 +211,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -238,8 +232,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -274,8 +266,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -310,8 +300,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -344,8 +332,6 @@ export default class ContextExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, diff --git a/src/store/group.ts b/src/store/group.ts index 7ff44559db..ce6bc78e6c 100644 --- a/src/store/group.ts +++ b/src/store/group.ts @@ -119,8 +119,6 @@ export default class GroupModule extends VuexModule { } catch (error) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -163,8 +161,6 @@ export default class GroupModule extends VuexModule { } catch (error) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, diff --git a/src/store/rooms.ts b/src/store/rooms.ts index 8d92f7d39c..5b793c272f 100644 --- a/src/store/rooms.ts +++ b/src/store/rooms.ts @@ -213,7 +213,6 @@ export default class RoomsModule extends VuexModule { this.setRoomData(data.gridElements || []); if (indicateLoading) this.setLoading(false); } catch (error: any) { - console.log(error); this.setError(error); if (indicateLoading) this.setLoading(false); } diff --git a/src/store/school-external-tools.ts b/src/store/school-external-tools.ts index cf08e52c8c..0643f1a946 100644 --- a/src/store/school-external-tools.ts +++ b/src/store/school-external-tools.ts @@ -111,8 +111,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -145,8 +143,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -170,8 +166,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -202,8 +196,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -236,8 +228,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -267,8 +257,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -300,8 +288,6 @@ export default class SchoolExternalToolsModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, diff --git a/src/store/user-login-migrations.ts b/src/store/user-login-migrations.ts index 7f2454550f..fe0398577e 100644 --- a/src/store/user-login-migrations.ts +++ b/src/store/user-login-migrations.ts @@ -116,8 +116,6 @@ export default class UserLoginMigrationModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -158,8 +156,6 @@ export default class UserLoginMigrationModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -200,8 +196,6 @@ export default class UserLoginMigrationModule extends VuexModule { return; } - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -232,8 +226,6 @@ export default class UserLoginMigrationModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -264,8 +256,6 @@ export default class UserLoginMigrationModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -294,8 +284,6 @@ export default class UserLoginMigrationModule extends VuexModule { } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code, @@ -316,21 +304,16 @@ export default class UserLoginMigrationModule extends VuexModule { try { const response: AxiosResponse = await this.userLoginMigrationApi.userLoginMigrationControllerCloseMigration(); - console.log(response.data); if (response.data.closedAt) { const userLoginMigration: UserLoginMigration = UserLoginMigrationMapper.mapToUserLoginMigration(response.data); - console.log(userLoginMigration); this.setUserLoginMigration(userLoginMigration); } else { - console.log(this.userLoginMigration); this.setUserLoginMigration(undefined); } } catch (error: unknown) { const apiError = mapAxiosErrorToResponseError(error); - console.log(apiError); - this.setBusinessError({ error: apiError, statusCode: apiError.code,