fix login not working for non-env users
All checks were successful
delpoy / build-and-deploy (push) Successful in 43s

This commit is contained in:
bytedream 2024-10-19 20:35:58 +02:00
parent c2c1660064
commit b59354c2f9

View File

@ -9,7 +9,7 @@
loginRequest = new Promise(async (resolve) => {
const response = await fetch(`${env.PUBLIC_BASE_PATH}/admin/login`, {
method: 'POST',
body: new FormData(document.forms[0])
body: JSON.stringify(Object.fromEntries(new FormData(document.forms[0])))
});
if (response.ok) {
window.location = `${env.PUBLIC_BASE_PATH}/admin`;