diff options
author | Dessalines <happydooby@gmail.com> | 2019-08-09 17:19:09 -0700 |
---|---|---|
committer | Dessalines <happydooby@gmail.com> | 2019-08-09 17:19:09 -0700 |
commit | b7d18f0a6ad85bbae47803c3b0ac4308f6f06083 (patch) | |
tree | 0551b2364c6fb4b073c348b32e483e590ea51cc1 | |
parent | 96b2a965376dfeff2d7941c9e2c778f5528ec229 (diff) | |
parent | ac5d1f5b32004cba6f292089fc7a64c2acdbbdda (diff) |
Fixing merge conflicts.
-rw-r--r-- | server/src/api/comment.rs | 2 | ||||
-rw-r--r-- | ui/src/components/navbar.tsx | 3 | ||||
-rw-r--r-- | ui/src/components/post-form.tsx | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/server/src/api/comment.rs b/server/src/api/comment.rs index 19752d83..3d18c72a 100644 --- a/server/src/api/comment.rs +++ b/server/src/api/comment.rs @@ -101,7 +101,7 @@ impl Perform<CommentResponse> for Oper<CreateComment> { 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 5738483d..7a173bed 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -155,8 +155,7 @@ export class Navbar extends Component<any, NavbarState> { 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 8aa7a5ea..79d37b42 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -131,7 +131,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> { <button type="submit" class="btn btn-secondary mr-2"> {this.state.loading ? <svg class="icon icon-spinner spin"><use xlinkHref="#icon-spinner"></use></svg> : - this.props.post ? capitalizeFirstLetter(i18n.t('save')) : capitalizeFirstLetter(i18n.t('Create'))}</button> + this.props.post ? capitalizeFirstLetter(i18n.t('save')) : capitalizeFirstLetter(i18n.t('create'))}</button> {this.props.post && <button type="button" class="btn btn-secondary" onClick={linkEvent(this, this.handleCancel)}><T i18nKey="cancel">#</T></button>} </div> </div> |