Add missed return after ctx.ServerError (#31130)

(cherry picked from commit b6f15c7948ac3d09977350de83ec91d5789ea083)
This commit is contained in:
Lunny Xiao 2024-05-28 17:31:59 +08:00 committed by Earl Warren
parent ca0921a95a
commit 344bf48c9b
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 5 additions and 0 deletions

View file

@ -840,6 +840,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)