feat: login con idUsuario
This commit is contained in:
1 parent
d1d8bf03ae
commit
57a83cd393
2 files changed
+14
-15
No files matched your search
@@ -19,7 +19,7 @@ function LoginForm() {
|
||||
const res = await fetch("/api/auth", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ email: rut, password: clave }),
|
||||
body: JSON.stringify({ idUsuario: rut, password: clave }),
|
||||
});
|
||||
const j = await res.json();
|
||||
if (!res.ok) throw new Error(j.error || `HTTP ${res.status}`);
|
||||
|
||||
Reference in new issue
Block a user