Changed the name of the used query.

This commit is contained in:
Hannes Heine 2021-08-10 14:45:32 +02:00
parent 8c6ea5aa12
commit 5300bc8e1a

View File

@ -38,7 +38,7 @@
</div> </div>
</template> </template>
<script> <script>
import { sendEmail } from '../../graphql/queries' import { sendResetPasswordEmail } from '../../graphql/queries'
import InputEmail from '../../components/Inputs/InputEmail' import InputEmail from '../../components/Inputs/InputEmail'
export default { export default {
@ -58,13 +58,17 @@ export default {
async onSubmit() { async onSubmit() {
this.$apollo this.$apollo
.query({ .query({
query: sendEmail, query: sendResetPasswordEmail,
variables: { variables: {
email: this.form.email, email: this.form.email,
}, },
}) })
.then(() => this.$router.push('/thx/password')) .then((result) => {
.catch(() => this.$router.push('/thx/password')) this.$router.push('/thx/password')
})
.catch((error) => {
this.$router.push('/thx/password')
})
}, },
}, },
} }