Первый коммит после распаковки архива

This commit is contained in:
2025-08-14 20:14:42 +03:00
commit 5d4e9ba201
354 changed files with 40492 additions and 0 deletions

36
src/api/auth.js Normal file
View File

@@ -0,0 +1,36 @@
// src/api/auth.js
export async function registerStep1(data) {
const r = await fetch('/api/register-step1', {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify(data)
});
return r.json();
}
export async function registerStep2(data, token) {
const r = await fetch('/api/register-step2', {
method:'POST', headers:{
'Content-Type':'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify(data)
});
return r.json();
}
export async function registerStep3(data, token) {
const r = await fetch('/api/register-step3', {
method:'POST', headers:{
'Content-Type':'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify(data)
});
return r.json();
}
export async function login(data) {
const r = await fetch('/api/login', {
method:'POST', headers:{'Content-Type':'application/json'},
body: JSON.stringify(data)
});
return r.json();
}