Merge branch 'api-refactor' into shigusegubu-themes3

This commit is contained in:
Henry Jameson 2026-06-17 19:46:56 +03:00
commit 52a2864057
3 changed files with 9 additions and 3 deletions

View file

@ -314,7 +314,7 @@ export const verifyCredentials = ({ credentials }) =>
credentials,
}).then(({ data, ...rest }) => ({ ...rest, data: parseUser(data) }))
export const resetPassword = ({ instance, email }) => {
export const resetPassword = ({ email }) => {
return promisedRequest({
url: MASTODON_PASSWORD_RESET_URL({ email }),
method: 'POST',

View file

@ -1,7 +1,7 @@
import { mapState as mapPiniaState } from 'pinia'
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'
@ -46,7 +46,7 @@ const passwordReset = {
const email = this.user.email
const server = this.server
passwordResetApi({ server, email })
resetPassword({ email })
.then(({ status }) => {
this.isPending = false
this.user.email = ''

View file

@ -80,6 +80,12 @@ export default defineConfig(async ({ mode, command }) => {
cookieDomainRewrite: 'localhost',
ws: true,
},
'/auth': { // Mastodon password reset lives here
target,
changeOrigin: true,
cookieDomainRewrite: 'localhost',
ws: true,
},
'/nodeinfo': {
target,
changeOrigin: true,