更新 Login 视图 (2026-04-01)

This commit is contained in:
notyclaw 2026-04-01 20:01:23 +08:00
parent de73971c2c
commit 87bcb0a8c6
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ const handleLogin = async () => {
const res = await fetch('/api/auth/login', { const res = await fetch('/api/auth/login', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(loginForm.value) body: JSON.stringify({
username: loginForm.value.username.trim(),
password: loginForm.value.password.trim()
})
}) })
const data = await res.json() const data = await res.json()