fix: user registration with email support
This commit is contained in:
@@ -17,6 +17,7 @@ export default function RegisterPage() {
|
||||
|
||||
const formData = new FormData(e.currentTarget);
|
||||
const username = formData.get('username') as string;
|
||||
const email = formData.get('email') as string;
|
||||
const password = formData.get('password') as string;
|
||||
const confirmPassword = formData.get('confirmPassword') as string;
|
||||
|
||||
@@ -30,7 +31,7 @@ export default function RegisterPage() {
|
||||
const response = await fetch('/api/v1/auth/register', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ username, password })
|
||||
body: JSON.stringify({ username, email, password })
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
@@ -79,6 +80,19 @@ export default function RegisterPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<label className="text-[10px] font-mono text-gray-400">EMAIL</label>
|
||||
<div className="relative">
|
||||
<input
|
||||
name="email"
|
||||
type="email"
|
||||
className="w-full bg-black/50 border border-gray-800 focus:border-cyber-pink text-white p-2.5 pl-8 rounded-sm outline-none font-mono text-sm"
|
||||
required
|
||||
/>
|
||||
<Mail className="absolute left-2.5 top-3 text-gray-600 w-3 h-3" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<label className="text-[10px] font-mono text-gray-400">PASSWORD</label>
|
||||
<div className="relative">
|
||||
|
||||
Reference in New Issue
Block a user