Add missed return after ctx.ServerError (#31130) (#31133)

Backport #31130 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit e6bacf1fed57e33fcbbb7d57782bfc5daa8f2fee)
This commit is contained in:
Giteabot 2024-05-28 18:47:11 +08:00 committed by Earl Warren
parent ebf1ba683b
commit 3bdf9eae01
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 5 additions and 0 deletions

View file

@ -841,6 +841,7 @@ func ActivateEmail(ctx *context.Context) {
if email := user_model.VerifyActiveEmailCode(ctx, code, emailStr); email != nil {
if err := user_model.ActivateEmail(ctx, email); err != nil {
ctx.ServerError("ActivateEmail", err)
return
}
log.Trace("Email activated: %s", email.Email)