From 6bcc62a7e7b77c1129c16d9a8c979e003b6481e5 Mon Sep 17 00:00:00 2001 From: whoswhip Date: Wed, 7 Jan 2026 16:41:10 -0500 Subject: [PATCH] fix: update TOTP API request payload to use 'code' instead of 'totpcode' --- SharpbinV3.Client/src/lib/components/Modal.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharpbinV3.Client/src/lib/components/Modal.svelte b/SharpbinV3.Client/src/lib/components/Modal.svelte index 37b1460..db207b2 100644 --- a/SharpbinV3.Client/src/lib/components/Modal.svelte +++ b/SharpbinV3.Client/src/lib/components/Modal.svelte @@ -161,7 +161,7 @@ const res = await fetch('/api/auth/totp/enable', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }, - body: JSON.stringify({ secret: totpSecret, totpcode: code }) + body: JSON.stringify({ secret: totpSecret, code: code }) }); if (!res.ok) { const data = await res.json().catch(() => null); @@ -184,7 +184,7 @@ const res = await fetch('/api/auth/totp/disable', { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }, - body: JSON.stringify({ totpcode: code }) + body: JSON.stringify({ code: code }) }); if (!res.ok) { const data = await res.json().catch(() => null);