forked from kompetenzinventar/ki-frontend
env variables usage, more form elements
This commit is contained in:
@ -26,6 +26,7 @@
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mb-4">Login</button>
|
||||
</form>
|
||||
<a href="https://resetpw.wtf-eg.de/">Globales WTF Passwort zurücksetzen</a>
|
||||
<div class="alert alert-danger mb-4 mt-4" role="alert" v-if="showErrorMessage">
|
||||
Mit deinen Login Daten ist ein Fehler aufgetreten. Versuch es nochmal oder <a href="https://resetpw.wtf-eg.de/">erzeuge ein neues Passwort</a>.
|
||||
</div>
|
||||
@ -40,12 +41,19 @@ import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
data(){
|
||||
return {
|
||||
showErrorMessage: false,
|
||||
email: '',
|
||||
password: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async submitLogin(){
|
||||
this.showErrorMessage = false
|
||||
try{
|
||||
const loginResult = await axios.post(
|
||||
`${this.apiUrl}/login`,
|
||||
`${process.env.VUE_APP_API_URL}/users/login`,
|
||||
{
|
||||
email: this.email,
|
||||
password: this.password
|
||||
@ -63,13 +71,6 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
showErrorMessage: false,
|
||||
email: '',
|
||||
password: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user