add check modal window
This commit is contained in:
+11
-11
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user