mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
small registration changes
This commit is contained in:
@@ -16,7 +16,6 @@ export default function SignInPage() {
|
||||
e.preventDefault();
|
||||
setError('');
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/auth/signup', {
|
||||
method: 'POST',
|
||||
@@ -28,12 +27,15 @@ export default function SignInPage() {
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
console.log('Login successful');
|
||||
router.push('/');
|
||||
} else {
|
||||
const data = await response.json();
|
||||
console.log('Login failed:', data.error || 'Something went wrong');
|
||||
setError(data.error || 'Something went wrong');
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Login failed: Failed to create account');
|
||||
setError('Failed to create account');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user