langsam ernährt sich das Eichhorn
This commit is contained in:
parent
38445559c2
commit
543fd56116
@ -31,8 +31,8 @@ class App extends Component {
|
||||
if (user) {
|
||||
this.setState({
|
||||
currentUser: user,
|
||||
showModeratorBoard: user.roles.includes("ROLE_MODERATOR"),
|
||||
showAdminBoard: user.roles.includes("ROLE_ADMIN")
|
||||
//showModeratorBoard: user.roles.includes("ROLE_MODERATOR"),
|
||||
//showAdminBoard: user.roles.includes("ROLE_ADMIN")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ class Login extends Component {
|
||||
if (this.checkBtn.context._errors.length === 0) {
|
||||
AuthService.login(this.state.username, this.state.password).then(
|
||||
() => {
|
||||
this.props.history.push("/profile");
|
||||
this.props.navigate('/profile');
|
||||
window.location.reload();
|
||||
},
|
||||
error => {
|
||||
|
||||
@ -10,7 +10,7 @@ class AuthService {
|
||||
password
|
||||
})
|
||||
.then(response => {
|
||||
if (response.data.accessToken) {
|
||||
if (response.data.token) {
|
||||
localStorage.setItem('user', JSON.stringify(response.data));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user