Use email instead of username when resetting a user password (#10)

This commit is contained in:
konrad 2018-12-20 12:13:55 +00:00 committed by Gitea
parent 45579ee237
commit a3d1f4ae04

View file

@ -5,7 +5,7 @@
<form id="loginform" @submit.prevent="submit" v-if="!isSuccess">
<div class="field">
<div class="control">
<input type="text" class="input" name="username" placeholder="Username" v-model="username" required>
<input type="text" class="input" name="email" placeholder="Email-Adress" v-model="email" required>
</div>
</div>
@ -36,7 +36,7 @@
export default {
data() {
return {
username: '',
email: '',
error: '',
isSuccess: false,
loading: false
@ -47,7 +47,7 @@
const cancel = message.setLoading(this)
this.error = ''
let credentials = {
user_name: this.username,
email: this.email,
}
HTTP.post(`user/password/token`, credentials)