Files
no-copy-frontend/src/app/api/action.ts
T

27 lines
528 B
TypeScript
Raw Normal View History

2025-11-25 17:13:16 +07:00
'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();
return parsed;
} catch (error) {
throw error;
}
}