adit endpoints

This commit is contained in:
smanylov
2025-12-11 20:38:06 +07:00
parent 67c6d07e4d
commit b63828befb
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -75,11 +75,15 @@ export async function authorization(
try {
const { email, password } = validatedFields.data;
const response = await fetch(`${API_BASE_URL}/v1/api/auth/login`, {
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
method: 'POST',
body: JSON.stringify({
email: email,
password: password
version: 1,
msg_id: 20001,
message_body: {
email: email,
password: password
}
}),
headers: {
"Content-Type": "application/json",
@@ -88,7 +92,7 @@ export async function authorization(
});
if (response.ok) {
let parsed = await response.json();
await createSession(parsed.token, parsed.email);
await createSession(parsed.message_body.token, email);
} else {
throw ('request-ended-with-an-error');
}
+1 -1
View File
@@ -55,7 +55,7 @@ export const loginFormSchema = z
.trim(),
})
export const localDevelopmentUrl = 'http://localhost:80';
export const localDevelopmentUrl = 'http://localhost';
export const testUserData = {
fullName: 'test',