[Glitch] Fix sign-up e-mail confirmation page reloading on error or redirect
Port 199acce48176d50b8ec7085f31a36f35119abfcc to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
dae6f19490
commit
08757fbbbd
@ -4,9 +4,12 @@ import axios from 'axios';
|
|||||||
import ready from 'flavours/glitch/ready';
|
import ready from 'flavours/glitch/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…
x
Reference in New Issue
Block a user