From ac147086f12eaa5efee4fdb702d81f994ec9ec95 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Tue, 26 Sep 2023 18:35:51 -0700 Subject: [PATCH] fix: make password changing actually work --- src/lib/auth.ts | 13 ------------- src/routes/admin/config/+page.svelte | 10 ++++++++++ src/routes/login/+page.svelte | 3 +-- .../profile/(local_user)/password/+page.svelte | 17 +++++++++++++---- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 34fab3c4..5e824d6e 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -227,19 +227,6 @@ instance.subscribe(async (i) => { } catch (e) {} }) -export function updateJwt(id: number, newJwt: string) { - const pd = get(profileData) - let prof = pd.profiles.find((p) => p.id == id) - - if (!prof) return - prof = serializeUser(prof) - prof.jwt = newJwt - - profileData.update((p) => ({ ...p, profile: id })) - - profile.update(() => prof) -} - export async function setUserID(id: number) { const pd = get(profileData) if (id == -1) { diff --git a/src/routes/admin/config/+page.svelte b/src/routes/admin/config/+page.svelte index 920d7e82..dc293a15 100644 --- a/src/routes/admin/config/+page.svelte +++ b/src/routes/admin/config/+page.svelte @@ -128,6 +128,16 @@ Federation enabled + + Federation debug mode + + + Captcha enabled + + {#if formData.captcha_enabled} + {console.log(formData.captcha_difficulty)} +