注册错误提示

This commit is contained in:
北枳 2025-08-31 07:05:14 +08:00
parent 828e374b9b
commit fc152ee745
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ export default function SignupPage() {
router.push("/login?registered=true");
} catch (error: any) {
console.error("Signup error:", error);
setFormError(error.msg || "Registration failed, please try again");
setFormError(error.message || "Registration failed, please try again");
} finally {
setIsSubmitting(false);
}

View File

@ -393,7 +393,7 @@ export const registerUser = async ({
const data = await response.json();
console.log('data', data)
if(!data.success){
throw new Error(data.msg)
throw new Error(data.message)
}
return data as {
success: boolean;