10 lines
290 B
JavaScript
10 lines
290 B
JavaScript
async function handleLogin(event) {
|
|
event.preventDefault();
|
|
const username = document.getElementById("username").value;
|
|
const password = document.getElementById("password").value;
|
|
const result = await login(username, password);
|
|
if (result) {
|
|
window.location.href = "/";
|
|
}
|
|
}
|