@@ -17,9 +17,8 @@ const UserSchema = new mongoose.Schema(
role: { type: String, enum: ROLES, default: "user" },
securityQuestion: {
type: String,
- required: true,
},
- securityAnswer: { type: String, required: true },
+ securityAnswer: { type: String },
{ timestamps: true }
);
@@ -55,7 +55,7 @@ export default function ResetPasswordPage() {
} else {
setAlert({
type: "error",
- message: data.message || "验证失败,请重试",
+ message: data.error || "验证失败,请重试",
});
}
} catch (error) {