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