diff --git a/server/src/api/comment.rs b/server/src/api/comment.rs index 19752d8..3d18c72 100644 --- a/server/src/api/comment.rs +++ b/server/src/api/comment.rs @@ -101,7 +101,7 @@ impl Perform for Oper { let _inserted_like = match CommentLike::like(&conn, &like_form) { Ok(like) => like, Err(_e) => { - return Err(APIError::err(&self.op, ""))? + return Err(APIError::err(&self.op, "couldnt_like_comment"))? } }; diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 5738483..7a173be 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -155,8 +155,7 @@ export class Navbar extends Component { parseMessage(msg: any) { let op: UserOperation = msgOp(msg); if (msg.error) { - // TODO - if (msg.error == "Not logged in.") { + if (msg.error == "not_logged_in") { UserService.Instance.logout(); location.reload(); } diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 8aa7a5e..79d37b4 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -131,7 +131,7 @@ export class PostForm extends Component { + this.props.post ? capitalizeFirstLetter(i18n.t('save')) : capitalizeFirstLetter(i18n.t('create'))} {this.props.post && }