remove password reset
This commit is contained in:
parent
d2dcdfbd80
commit
ecfea5c5e3
2 changed files with 10 additions and 23 deletions
|
|
@ -1,22 +0,0 @@
|
|||
import { reduce } from 'lodash'
|
||||
|
||||
const MASTODON_PASSWORD_RESET_URL = '/auth/password'
|
||||
|
||||
const resetPassword = ({ instance, email }) => {
|
||||
const params = { email }
|
||||
const query = reduce(
|
||||
params,
|
||||
(acc, v, k) => {
|
||||
const encoded = `${k}=${encodeURIComponent(v)}`
|
||||
return `${acc}&${encoded}`
|
||||
},
|
||||
'',
|
||||
)
|
||||
const url = `${instance}${MASTODON_PASSWORD_RESET_URL}?${query}`
|
||||
|
||||
return window.fetch(url, {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
export default resetPassword
|
||||
Loading…
Add table
Add a link
Reference in a new issue