fix: user registration with email support
Some checks failed
docker-push / build-and-push (push) Failing after 18s
docker-push / deploy (push) Has been skipped

This commit is contained in:
SpecialX
2025-11-28 19:29:49 +08:00
parent 210e791f76
commit d2468e9fca
178 changed files with 39 additions and 579 deletions

View File

@@ -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">