_, err = models.GetTwoFactorByUID(u.ID)
if err != nil {
if !models.IsErrTwoFactorNotEnrolled(err) {
- ctx.InternalServerError(err)
+ ctx.ServerError("IsErrTwoFactorNotEnrolled", err)
return nil
}
ctx.Data["TwoFactorEnabled"] = false
return
}
if err = u.SetPassword(form.Password); err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("SetPassword", err)
return
}
}
if form.Reset2FA {
tf, err := models.GetTwoFactorByUID(u.ID)
if err != nil && !models.IsErrTwoFactorNotEnrolled(err) {
- ctx.InternalServerError(err)
+ ctx.ServerError("GetTwoFactorByUID", err)
return
}
if err = models.DeleteTwoFactorByID(tf.ID, u.ID); err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("DeleteTwoFactorByID", err)
return
}
}
iw.IssueID = issue.ID
iw.IsWatching, err = models.CheckIssueWatch(ctx.User, issue)
if err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("CheckIssueWatch", err)
return
}
}
pb, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID"))
if err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("GetProjectBoard", err)
return
}
if pb.ProjectID != ctx.ParamsInt64(":id") {
board, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID"))
if err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("GetProjectBoard", err)
return
}
if board.ProjectID != ctx.ParamsInt64(":id") {
}
if err := issue.PullRequest.LoadBaseRepo(); err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("LoadBaseRepo", err)
return
}
if err := issue.PullRequest.LoadHeadRepo(); err != nil {
- ctx.InternalServerError(err)
+ ctx.ServerError("LoadHeadRepo", err)
return
}