summaryrefslogtreecommitdiff
path: root/frontend/admin/admin.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/admin/admin.js')
-rw-r--r--frontend/admin/admin.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/admin/admin.js b/frontend/admin/admin.js
new file mode 100644
index 0000000..5a194c9
--- /dev/null
+++ b/frontend/admin/admin.js
@@ -0,0 +1,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");
+}