convert to jsonless

This commit is contained in:
Bruno Rybársky 2024-02-02 12:28:37 +01:00
parent 0c4f37bab3
commit 1510e416a6

@ -2,17 +2,15 @@ function login() {
const email = document.getElementById("email").value;
const password = document.getElementById("password").value;
const data = new URLSearchParams();
data.append("action", "login");
data.append("email", email);
data.append("password", password);
// Assuming you use fetch API to send data to the server
fetch('https://home.adlerka.top/account', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: {
action: 'login',
email: email,
password: password
},
body: data,
})
.then(response => response.json())
.then(data => {