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) { if (user) {
this.setState({ this.setState({
currentUser: user, currentUser: user,
showModeratorBoard: user.roles.includes("ROLE_MODERATOR"), //showModeratorBoard: user.roles.includes("ROLE_MODERATOR"),
showAdminBoard: user.roles.includes("ROLE_ADMIN") //showAdminBoard: user.roles.includes("ROLE_ADMIN")
}); });
} }

View File

@ -59,7 +59,7 @@ class Login extends Component {
if (this.checkBtn.context._errors.length === 0) { if (this.checkBtn.context._errors.length === 0) {
AuthService.login(this.state.username, this.state.password).then( AuthService.login(this.state.username, this.state.password).then(
() => { () => {
this.props.history.push("/profile"); this.props.navigate('/profile');
window.location.reload(); window.location.reload();
}, },
error => { error => {

View File

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