Skip to content

Commit dedc76f

Browse files
committed
fix: fixed reset password in settings page not working
1 parent f448269 commit dedc76f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib/pages/profile/SettingsPage.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<button
1313
class="btn btn-outline-primary"
1414
class:is-invalid={$resetPasswordError}
15-
on:click={() => sendResetPasswordLink(resetPasswordError, resetPasswordLoading, resetPasswordSuccess)}
15+
on:click={() => sendResetPasswordLink(resetPasswordError, resetPasswordLoading, resetPasswordSuccess, session)}
1616
aria-describedby="resetPassword validationResetPassword"
1717
disabled={$resetPasswordLoading || !$session.siteInfo.emailEnabled}
1818
type="button"

src/lib/ui-logics/page-logics/SettingsPageLogics.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ export async function processLoad(event) {
2222
export async function sendResetPasswordLink(
2323
resetPasswordError,
2424
resetPasswordLoading,
25-
resetPasswordSuccess
25+
resetPasswordSuccess,
26+
session
2627
) {
2728
resetPasswordError.set(null);
2829
resetPasswordLoading.set(true);
2930
resetPasswordSuccess.set(false);
3031

31-
await sendResetPassword()
32+
await sendResetPassword(get(session).user.email)
3233
.then((body) => {
3334
resetPasswordLoading.set(false);
3435

0 commit comments

Comments
 (0)