add login page route

This commit is contained in:
Kentai Radiquum 2024-04-23 08:43:32 +05:00
parent 64886347f2
commit 5c9c3e67fa
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
3 changed files with 6 additions and 2 deletions

View file

@ -14,8 +14,8 @@ export const authorize = async (url, data) => {
try {
const response = await fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(data),
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: data,
});
if (response.status !== 200) {
throw new Error("Ошибка получения данных");