Skip to content

Commit

Permalink
remove most console.log & make rest console.error
Browse files Browse the repository at this point in the history
  • Loading branch information
odalys-dataport committed Nov 10, 2023
1 parent 1b139c0 commit 5a8f9cf
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ describe("FileDescription", () => {
showTitle: true,
src,
});
console.log(wrapper.html());
const link = wrapper.find("a");

expect(link.attributes("href")).toBe(src);
Expand Down Expand Up @@ -206,7 +205,6 @@ describe("FileDescription", () => {
showTitle: true,
src,
});
console.log(wrapper.html());
const link = wrapper.find("a");

expect(link.attributes("href")).toBe(src);
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Vue.use(VueDOMPurifyHTML, {
try {
await authModule.login(jwt);
} catch (e) {
console.log("### JWT invalid: ", e);
console.error("### JWT invalid: ", e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/ActivationCode.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down
1 change: 0 additions & 1 deletion src/pages/NewsCreate.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export default {
});
}
} catch (e) {
console.error(e);
notifierModule.show({
text: this.$t("components.organisms.FormNews.errors.create"),
status: "error",
Expand Down
2 changes: 0 additions & 2 deletions src/pages/NewsEdit.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/pages/administration/StudentOverview.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ export default {
});
}
} catch (error) {
console.error(error);
notifierModule.show({
text: this.$tc("pages.administration.sendMail.error", rowIds.length),
status: "error",
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 2 additions & 2 deletions src/store/collaborative-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
}
Expand Down
14 changes: 0 additions & 14 deletions src/store/context-external-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions src/store/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/store/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
14 changes: 0 additions & 14 deletions src/store/school-external-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
17 changes: 0 additions & 17 deletions src/store/user-login-migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -200,8 +196,6 @@ export default class UserLoginMigrationModule extends VuexModule {
return;
}

console.log(apiError);

this.setBusinessError({
error: apiError,
statusCode: apiError.code,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -316,21 +304,16 @@ export default class UserLoginMigrationModule extends VuexModule {
try {
const response: AxiosResponse<UserLoginMigrationResponse> =
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,
Expand Down

0 comments on commit 5a8f9cf

Please sign in to comment.