mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Withdrew the loginAPI call and replaced it with the Apollo sendEmail query.
This commit is contained in:
parent
61a1647f63
commit
bd1889295d
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import loginAPI from '../../apis/loginAPI.js'
|
||||
import { sendEmail } from '../../graphql/queries'
|
||||
import InputEmail from '../../components/Inputs/InputEmail'
|
||||
|
||||
export default {
|
||||
@ -56,9 +56,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
await loginAPI.sendEmail(this.form.email)
|
||||
// always give success to avoid email spying
|
||||
this.$router.push('/thx/password')
|
||||
this.$apollo
|
||||
.query({
|
||||
query: sendEmail,
|
||||
variables: {
|
||||
email: this.form.email,
|
||||
},
|
||||
})
|
||||
.then(() => this.$router.push('/thx/password'))
|
||||
.error(() => this.$router.push('/thx/password'))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user