From 65606dd4138b5fa807f72a7a446ffdb0b38a0f00 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 7 Apr 2021 11:54:38 -0400 Subject: [PATCH] Adding back in logging --- src/shared/components/admin-settings.tsx | 1 + src/shared/components/comment-form.tsx | 1 + src/shared/components/communities.tsx | 1 + src/shared/components/community-form.tsx | 1 + src/shared/components/community.tsx | 1 + src/shared/components/create-post.tsx | 1 + src/shared/components/create-private-message.tsx | 1 + src/shared/components/login.tsx | 1 + src/shared/components/main.tsx | 1 + src/shared/components/modlog.tsx | 1 + src/shared/components/navbar.tsx | 1 + src/shared/components/password_change.tsx | 1 + src/shared/components/post-form.tsx | 1 + src/shared/components/private-message-form.tsx | 1 + 14 files changed, 14 insertions(+) diff --git a/src/shared/components/admin-settings.tsx b/src/shared/components/admin-settings.tsx index 0836a16d..19856f3c 100644 --- a/src/shared/components/admin-settings.tsx +++ b/src/shared/components/admin-settings.tsx @@ -212,6 +212,7 @@ export class AdminSettings extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.context.router.history.push("/"); diff --git a/src/shared/components/comment-form.tsx b/src/shared/components/comment-form.tsx index 26775943..a2da9331 100644 --- a/src/shared/components/comment-form.tsx +++ b/src/shared/components/comment-form.tsx @@ -131,6 +131,7 @@ export class CommentForm extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); // Only do the showing and hiding if logged in if (UserService.Instance.localUserView) { diff --git a/src/shared/components/communities.tsx b/src/shared/components/communities.tsx index 74a1ac32..953e9f1c 100644 --- a/src/shared/components/communities.tsx +++ b/src/shared/components/communities.tsx @@ -310,6 +310,7 @@ export class Communities extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/community-form.tsx b/src/shared/components/community-form.tsx index 97d335e2..396c0f3f 100644 --- a/src/shared/components/community-form.tsx +++ b/src/shared/components/community-form.tsx @@ -314,6 +314,7 @@ export class CommunityForm extends Component< parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/community.tsx b/src/shared/components/community.tsx index bd603800..b75a816e 100644 --- a/src/shared/components/community.tsx +++ b/src/shared/components/community.tsx @@ -432,6 +432,7 @@ export class Community extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.context.router.history.push("/"); diff --git a/src/shared/components/create-post.tsx b/src/shared/components/create-post.tsx index 00221d6d..f3d453bd 100644 --- a/src/shared/components/create-post.tsx +++ b/src/shared/components/create-post.tsx @@ -171,6 +171,7 @@ export class CreatePost extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/create-private-message.tsx b/src/shared/components/create-private-message.tsx index 3771da62..aceba6b9 100644 --- a/src/shared/components/create-private-message.tsx +++ b/src/shared/components/create-private-message.tsx @@ -137,6 +137,7 @@ export class CreatePrivateMessage extends Component< parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/login.tsx b/src/shared/components/login.tsx index 325df274..7a305f51 100644 --- a/src/shared/components/login.tsx +++ b/src/shared/components/login.tsx @@ -425,6 +425,7 @@ export class Login extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state = this.emptyState; diff --git a/src/shared/components/main.tsx b/src/shared/components/main.tsx index 4fcc56a5..05624d3b 100644 --- a/src/shared/components/main.tsx +++ b/src/shared/components/main.tsx @@ -724,6 +724,7 @@ export class Main extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/modlog.tsx b/src/shared/components/modlog.tsx index 1fc3b0b0..960eeb28 100644 --- a/src/shared/components/modlog.tsx +++ b/src/shared/components/modlog.tsx @@ -471,6 +471,7 @@ export class Modlog extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/navbar.tsx b/src/shared/components/navbar.tsx index 12a6ed27..04061a11 100644 --- a/src/shared/components/navbar.tsx +++ b/src/shared/components/navbar.tsx @@ -380,6 +380,7 @@ export class Navbar extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { if (msg.error == "not_logged_in") { UserService.Instance.logout(); diff --git a/src/shared/components/password_change.tsx b/src/shared/components/password_change.tsx index 6469cb7b..0c30c714 100644 --- a/src/shared/components/password_change.tsx +++ b/src/shared/components/password_change.tsx @@ -149,6 +149,7 @@ export class PasswordChange extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/post-form.tsx b/src/shared/components/post-form.tsx index 219ca249..5ee3841f 100644 --- a/src/shared/components/post-form.tsx +++ b/src/shared/components/post-form.tsx @@ -606,6 +606,7 @@ export class PostForm extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/private-message-form.tsx b/src/shared/components/private-message-form.tsx index 89d61132..a19095d7 100644 --- a/src/shared/components/private-message-form.tsx +++ b/src/shared/components/private-message-form.tsx @@ -225,6 +225,7 @@ export class PrivateMessageForm extends Component< parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false;