|
|
@ -61,14 +61,14 @@ export default class Login extends Vue { |
|
|
|
|
|
|
|
private currentSession() { |
|
|
|
this.$store.dispatch('user_currentSession') |
|
|
|
.then((res: any) => this.$router.push({name: 'Dashboard', params: {username: res.data.username}})) |
|
|
|
.then((res: any) => this.$router.push({name: 'DashboardHome', params: {username: res.data.username}})) |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private user_login() { |
|
|
|
this.$store.dispatch('user_login', {username: this.username, password: this.password}) |
|
|
|
.then(() => this.$router.push({name: 'Dashboard', params: {username: this.username}})) |
|
|
|
.then(() => this.$router.push({name: 'DashboardHome', params: {username: this.username}})) |
|
|
|
.catch(() => { |
|
|
|
this.msg = this.$store.getters.user_err.response.data.errors.message || 'Something went wrong!' |
|
|
|
}); |
|
|
|