convert to jsonless
This commit is contained in:
parent
0c4f37bab3
commit
1510e416a6
@ -2,17 +2,15 @@ function login() {
|
|||||||
const email = document.getElementById("email").value;
|
const email = document.getElementById("email").value;
|
||||||
const password = document.getElementById("password").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
|
// Assuming you use fetch API to send data to the server
|
||||||
fetch('https://home.adlerka.top/account', {
|
fetch('https://home.adlerka.top/account', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
body: data,
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
body: {
|
|
||||||
action: 'login',
|
|
||||||
email: email,
|
|
||||||
password: password
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
Loading…
Reference in New Issue
Block a user