Fix sign-up e-mail confirmation page reloading on error or redirect (#34548)
This commit is contained in:
parent
b1b949f16c
commit
199acce481
1 changed files with 5 additions and 2 deletions
|
@ -4,9 +4,12 @@ import axios from 'axios';
|
||||||
import ready from '../mastodon/ready';
|
import ready from '../mastodon/ready';
|
||||||
|
|
||||||
async function checkConfirmation() {
|
async function checkConfirmation() {
|
||||||
const response = await axios.get('/api/v1/emails/check_confirmation');
|
const response = await axios.get('/api/v1/emails/check_confirmation', {
|
||||||
|
headers: { Accept: 'application/json' },
|
||||||
|
withCredentials: true,
|
||||||
|
});
|
||||||
|
|
||||||
if (response.data) {
|
if (response.status === 200 && response.data === true) {
|
||||||
window.location.href = '/start';
|
window.location.href = '/start';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue