feat: hcaptcha

This commit is contained in:
Tony Yang
2025-04-15 14:46:16 +08:00
parent b8ae97e49b
commit 1b60b3517d
20 changed files with 430 additions and 247 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ import { register } from '../lib/api';
const router = useRouter();
const handleNewUser = async ({ username, password }) => {
const handleNewUser = async ({ username, password, hcaptchaResponse }) => {
try {
const response = await register(username, password);
const response = await register(username, password, hcaptchaResponse);
alert(response.message || 'Registration successful! Please log in.');
// Redirect to login page