From 2bf6cd9241981765e2477914d172a3ccef658714 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Sat, 13 Aug 2022 16:54:29 +0200 Subject: [PATCH] Fix redirect to login page after password change (#461) * Fix redirect to login page after password change Copied from the similar fix in #414 * Fix typo in change-password form * Remove misplaced text from user management page --- web/src/lib/components/admin-page/user-management.svelte | 2 -- web/src/lib/components/forms/change-password-form.svelte | 2 +- web/src/routes/auth/change-password/index.svelte | 9 +++------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/web/src/lib/components/admin-page/user-management.svelte b/web/src/lib/components/admin-page/user-management.svelte index 7728e23119..8da3bda4e5 100644 --- a/web/src/lib/components/admin-page/user-management.svelte +++ b/web/src/lib/components/admin-page/user-management.svelte @@ -8,8 +8,6 @@ const dispatch = createEventDispatcher(); -

USER LIST

- diff --git a/web/src/lib/components/forms/change-password-form.svelte b/web/src/lib/components/forms/change-password-form.svelte index 34a7116d41..0b6b5fdfe8 100644 --- a/web/src/lib/components/forms/change-password-form.svelte +++ b/web/src/lib/components/forms/change-password-form.svelte @@ -47,7 +47,7 @@
immich-logo -

Chage Password

+

Change Password

Hi {user.firstName} diff --git a/web/src/routes/auth/change-password/index.svelte b/web/src/routes/auth/change-password/index.svelte index 7b5d1d3797..82e7890916 100644 --- a/web/src/routes/auth/change-password/index.svelte +++ b/web/src/routes/auth/change-password/index.svelte @@ -39,12 +39,9 @@ export let user: UserResponseDto; const onSuccessHandler = async () => { - /** Svelte route fetch */ - const res = await fetch('/auth/logout', { method: 'POST' }); - - if (res.status == 200 && res.statusText == 'OK') { - goto('/auth/login'); - } + await fetch('auth/logout', { method: 'POST' }); + + goto('/auth/login'); };