fix password reset component
This commit is contained in:
parent
07a1d3b9c4
commit
bf37842b5f
2 changed files with 3 additions and 3 deletions
|
|
@ -314,7 +314,7 @@ export const verifyCredentials = ({ credentials }) =>
|
||||||
credentials,
|
credentials,
|
||||||
}).then(({ data, ...rest }) => ({ ...rest, data: parseUser(data) }))
|
}).then(({ data, ...rest }) => ({ ...rest, data: parseUser(data) }))
|
||||||
|
|
||||||
export const resetPassword = ({ instance, email }) => {
|
export const resetPassword = ({ email }) => {
|
||||||
return promisedRequest({
|
return promisedRequest({
|
||||||
url: MASTODON_PASSWORD_RESET_URL({ email }),
|
url: MASTODON_PASSWORD_RESET_URL({ email }),
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { mapState as mapPiniaState } from 'pinia'
|
import { mapState as mapPiniaState } from 'pinia'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
import passwordResetApi from '../../services/new_api/password_reset.js'
|
import { resetPassword } from 'src/api/public.js'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ const passwordReset = {
|
||||||
const email = this.user.email
|
const email = this.user.email
|
||||||
const server = this.server
|
const server = this.server
|
||||||
|
|
||||||
passwordResetApi({ server, email })
|
resetPassword({ email })
|
||||||
.then(({ status }) => {
|
.then(({ status }) => {
|
||||||
this.isPending = false
|
this.isPending = false
|
||||||
this.user.email = ''
|
this.user.email = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue