langsam ernährt sich das Eichhorn

This commit is contained in:
Daniel Schick 2024-03-18 13:22:27 +01:00
parent 38445559c2
commit 543fd56116
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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 => {

View File

@ -10,7 +10,7 @@ class AuthService {
password
})
.then(response => {
if (response.data.accessToken) {
if (response.data.token) {
localStorage.setItem('user', JSON.stringify(response.data));
}