summaryrefslogtreecommitdiff
path: root/frontend/admin/admin.js
blob: 5a194c9e5a1639f4bb7b00de7df8d2bfc5b816c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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": "text/plain"
		},
		body: field.value,
	});

	alert("loggin' in");
}