aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/routes/(main)/(public)/reset-password/+page.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'code/app/src/routes/(main)/(public)/reset-password/+page.svelte')
-rw-r--r--code/app/src/routes/(main)/(public)/reset-password/+page.svelte11
1 files changed, 3 insertions, 8 deletions
diff --git a/code/app/src/routes/(main)/(public)/reset-password/+page.svelte b/code/app/src/routes/(main)/(public)/reset-password/+page.svelte
index 55859f6..a45ccdd 100644
--- a/code/app/src/routes/(main)/(public)/reset-password/+page.svelte
+++ b/code/app/src/routes/(main)/(public)/reset-password/+page.svelte
@@ -12,7 +12,7 @@
};
const formError = new FormError();
- const resetRequests = new PasswordResetService();
+ const passwordResetService = PasswordResetService.resolve();
let loading = false;
let showSuccessAlert = false;
@@ -23,7 +23,7 @@
showSuccessAlert = false;
showErrorAlert = false;
loading = true;
- const response = await resetRequests.create_request_async(formData.email.value);
+ const response = await passwordResetService.create_request_async(formData.email.value);
loading = false;
if (response.isCreated) {
showSuccessAlert = true;
@@ -37,17 +37,12 @@
}
}
} else {
- formError.title = $LL.unexpectedError();
- formError.subtitle = $LL.tryAgainSoon();
+ formError.set($LL.unexpectedError(), $LL.tryAgainSoon());
}
showErrorAlert = formError.has_error() && !showSuccessAlert;
}
</script>
-<svlete:head>
- <title>Reset password - Greatoffice</title>
-</svlete:head>
-
<div class="min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8">
<div class="sm:mx-auto sm:w-full p-2 sm:p-0 sm:max-w-md">
<h2 class="mt-6 text-3xl tracking-tight font-bold text-gray-900">