progres day 1

This commit is contained in:
smanylov
2025-11-25 17:13:16 +07:00
parent 10668aa997
commit 40766ae67b
26 changed files with 1336 additions and 216 deletions
+30
View File
@@ -0,0 +1,30 @@
'use server'
export async function testConnect() {
try {
const response = await fetch('http://localhost:8080/api/auth/register', {
method: 'POST',
body: JSON.stringify({
"firstName": "Serg",
"secondName": "Fedorovich",
"lastName": "Tankan",
"email": "gggpetst2test@e.ru",
"password": "1121231412"
}),
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
}
});
let parsed = await response.json();
console.log('all fine??');
console.log(parsed);
return parsed;
} catch (error) {
throw error;
}
}