add check modal window

This commit is contained in:
smanylov
2026-01-28 18:53:08 +07:00
parent a6a493fe97
commit c4ab78b89b
13 changed files with 318 additions and 67 deletions
+11 -11
View File
@@ -11,9 +11,9 @@ export async function logout() {
await fetch(`${API_BASE_URL}/v1/api/auth/logout`, {
method: 'POST',
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": `Bearer ${token}`,
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `Bearer ${token}`,
}
});
} catch (error) {
@@ -36,8 +36,8 @@ export async function authorization(
const password = formData.get('password');
/* для теста */
if (email === "test" && password === "test") {
await createSession("1111", "test");
if (email === 'test' && password === 'test') {
await createSession('1111', 'test');
redirect('/pages/dashboard');
}
/* для теста */
@@ -81,8 +81,8 @@ export async function authorization(
}
}),
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
if (response.ok) {
@@ -211,8 +211,8 @@ export async function registration(
}
}),
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
@@ -302,8 +302,8 @@ export async function tokenLifeExtension() {
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
method: 'POST',
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
'Content-Type': 'application/json',
'Accept': 'application/json',
},
body: JSON.stringify({
version: 1,