feat: refresh page when email is changed and instance requires verification
This commit is contained in:
parent
84aa1f95fe
commit
4b6dc03b13
1 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,14 @@ async function changeEmail() {
|
||||||
body: formData
|
body: formData
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const apiBase = useCookie("api_base").value;
|
||||||
|
|
||||||
|
if (apiBase) {
|
||||||
|
const stats = await useApi().fetchInstanceStats(apiBase);
|
||||||
|
if (stats.email_verification_required) {
|
||||||
|
return window.location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
alert('success!!')
|
alert('success!!')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (error?.response?.status !== 200) {
|
if (error?.response?.status !== 200) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue