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
This commit is contained in:
bo0tzz
2022-08-13 16:54:29 +02:00
committed by GitHub
parent 87d2a954a3
commit 2bf6cd9241
3 changed files with 4 additions and 9 deletions

View File

@@ -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');
};
</script>