diff --git a/src/lib/lemmy.ts b/src/lib/lemmy.ts index d3b3de59..16641e88 100644 --- a/src/lib/lemmy.ts +++ b/src/lib/lemmy.ts @@ -33,8 +33,13 @@ async function customFetch( ): Promise { const f = func ? func : fetch - const url = toURL(input) + if (init?.body && auth) { + const json = JSON.parse(init.body.toString()) + json.auth = auth + init.body = JSON.stringify(json) + } + const url = toURL(input) if (auth && url) url.searchParams.set('auth', auth) const res = await f(url ?? input, init) diff --git a/src/routes/profile/(local_user)/password/+page.svelte b/src/routes/profile/(local_user)/password/+page.svelte index 89996fc4..da49323a 100644 --- a/src/routes/profile/(local_user)/password/+page.svelte +++ b/src/routes/profile/(local_user)/password/+page.svelte @@ -1,12 +1,13 @@