Redirect to admin instead of update
This commit is contained in:
@@ -4,11 +4,13 @@
|
|||||||
<form aria-label="User signin" @submit.prevent>
|
<form aria-label="User signin" @submit.prevent>
|
||||||
<div class="label-div">
|
<div class="label-div">
|
||||||
<label>Brukernavn</label>
|
<label>Brukernavn</label>
|
||||||
<input type="text"
|
<input
|
||||||
v-model="username"
|
type="text"
|
||||||
placeholder="Brukernavn"
|
v-model="username"
|
||||||
autocapitalize="none"
|
placeholder="Brukernavn"
|
||||||
@keyup.enter="submit" />
|
autocapitalize="none"
|
||||||
|
@keyup.enter="submit"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="label-div row">
|
<div class="label-div row">
|
||||||
<label>Passord</label>
|
<label>Passord</label>
|
||||||
@@ -30,13 +32,13 @@ export default {
|
|||||||
username: undefined,
|
username: undefined,
|
||||||
password: undefined,
|
password: undefined,
|
||||||
error: undefined
|
error: undefined
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
login(this.username, this.password)
|
login(this.username, this.password)
|
||||||
.then(resp => this.$router.push("update"))
|
.then(resp => this.$router.push("admin"))
|
||||||
.catch(error => this.error = error.message || error)
|
.catch(error => (this.error = error.message || error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user