Fix sign-up e-mail confirmation page reloading on error or redirect (#34548)

This commit is contained in:
Claire 2025-05-05 15:20:45 +02:00
parent f1a6cca2e1
commit 0e026eafef

View File

@ -5,8 +5,11 @@ import ready from '../mastodon/ready';
ready(() => { ready(() => {
setInterval(() => { setInterval(() => {
axios.get('/api/v1/emails/check_confirmation').then((response) => { axios.get('/api/v1/emails/check_confirmation', {
if (response.data) { headers: { Accept: 'application/json' },
withCredentials: true,
}).then((response) => {
if (response.status === 200 && response.data === true) {
window.location = '/start'; window.location = '/start';
} }
}).catch(error => { }).catch(error => {