We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4a0d5b commit 1911006Copy full SHA for 1911006
kaiyuanshe/controllers/auth.go
@@ -149,6 +149,7 @@ func HandleRegister(c *gin.Context) {
149
verifyToken, err := utils.GenerateEmailVerificationToken(24)
150
if err != nil {
151
utils.ErrorResponse(c, http.StatusInternalServerError, "Internal server error", nil)
152
+ return
153
}
154
155
user := models.User{
@@ -172,6 +173,7 @@ func HandleRegister(c *gin.Context) {
172
173
logger.Log.Errorf("发送验证邮件失败: %v", err)
174
// 可以选择继续返回成功,但记录错误
175
utils.ErrorResponse(c, http.StatusInternalServerError, "Could not send email", nil)
176
177
178
179
utils.SuccessResponse(c, http.StatusOK, "Registration successful", nil)
0 commit comments