Reimplement fallback email dialog

This commit is contained in:
Johannes Zellner
2025-06-11 10:22:09 +02:00
parent 315210fe29
commit af75060001
5 changed files with 103 additions and 24 deletions
+4 -6
View File
@@ -103,17 +103,15 @@ function create() {
return [null];
},
async setFallbackEmail(fallbackEmail, password) {
let error, result;
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/profile/fallback_email`, { fallbackEmail, password }, { access_token: accessToken });
} catch (e) {
error = e;
return [e];
}
if (error) return error;
if (result.status !== 204) return result;
return null;
if (result.status !== 204) return [result];
return [null];
},
async setLanguage(language) {
let error, result;