From 185cefe250ddf2b057a72958b4da72dd9125f44e Mon Sep 17 00:00:00 2001 From: "MH.Dmitrii" Date: Thu, 19 Mar 2026 01:58:13 +0300 Subject: [PATCH] fix login.js 0.147 --- server/frontend/auth/login.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/frontend/auth/login.js b/server/frontend/auth/login.js index 5403018..8230d79 100644 --- a/server/frontend/auth/login.js +++ b/server/frontend/auth/login.js @@ -17,12 +17,12 @@ document.getElementById('loginForm').addEventListener('submit', async function ( const response = await fetch("https://ru.homyk.space/api/auth", { method: "POST", headers: { - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/json", }, - body: new URLSearchParams({ - password: userData.password + body: JSON.stringify({ + password: userData.password }), - }); + }); const data = await response.json(); // читаем только один раз if (response.ok) { // сохраняем только при успехе