()
| 99 | }; |
| 100 | |
| 101 | export async function sendVerificationEmail(): Promise<void> { |
| 102 | if (!isAuthAvailable()) { |
| 103 | showErrorNotification("Authentication uninitialized", { durationMs: 3000 }); |
| 104 | return; |
| 105 | } |
| 106 | |
| 107 | showLoaderBar(); |
| 108 | const response = await Ape.users.verificationEmail(); |
| 109 | if (response.status !== 200) { |
| 110 | hideLoaderBar(); |
| 111 | showErrorNotification("Failed to request verification email", { response }); |
| 112 | } else { |
| 113 | hideLoaderBar(); |
| 114 | showSuccessNotification("Verification email sent"); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | async function getDataAndInit(): Promise<boolean> { |
| 119 | try { |
no test coverage detected