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"> <form id="loginform" @submit.prevent="submit" v-if="!isSuccess">
<div class="field"> <div class="field">
<div class="control"> <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>
</div> </div>
@ -36,7 +36,7 @@
export default { export default {
data() { data() {
return { return {
username: '', email: '',
error: '', error: '',
isSuccess: false, isSuccess: false,
loading: false loading: false
@ -47,7 +47,7 @@
const cancel = message.setLoading(this) const cancel = message.setLoading(this)
this.error = '' this.error = ''
let credentials = { let credentials = {
user_name: this.username, email: this.email,
} }
HTTP.post(`user/password/token`, credentials) HTTP.post(`user/password/token`, credentials)