blob: bc3100778979aad29c5e55befe06d0ab62e0d000 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
const API_URL = "https://backend.laundryweb.altafcreator.com"
async function login() {
const field = document.getElementById("pwfield");
const response = await fetch(`${API_URL}/admin_login`, {
method: "POST",
credentials: "include",
headers: {
"Content-Type": "application/json"
},
body: `{"password": "${field.value}"}`,
});
}
async function checkLoginStatus() {
const response = await fetch(`${API_URL}/admin_check`, {
method: "POST",
credentials: "include"
});
console.log(response);
}
|