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.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/frontend/admin/admin.js b/frontend/admin/admin.js
index eda55db..ffe44c2 100644
--- a/frontend/admin/admin.js
+++ b/frontend/admin/admin.js
@@ -5,10 +5,17 @@ async function login() {
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);
+}