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"))?
}
};
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();
}
<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>