Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions routers/api/v1/repo/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ func CreatePushMirror(ctx *context.APIContext, mirrorOption *api.CreatePushMirro
if err = mirror_service.AddPushMirrorRemote(ctx, pushMirror, address); err != nil {
if err := repo_model.DeletePushMirrors(ctx, repo_model.PushMirrorOptions{ID: pushMirror.ID, RepoID: pushMirror.RepoID}); err != nil {
ctx.ServerError("DeletePushMirrors", err)
return
}
ctx.ServerError("AddPushMirrorRemote", err)
return
Expand Down
1 change: 1 addition & 0 deletions routers/web/admin/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func UnadoptedRepos(ctx *context.Context) {
repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx, q, &opts)
if err != nil {
ctx.ServerError("ListUnadoptedRepositories", err)
return
}
ctx.Data["Dirs"] = repoNames
pager := context.NewPagination(count, opts.PageSize, opts.Page, 5)
Expand Down
1 change: 1 addition & 0 deletions routers/web/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,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)
Expand Down
1 change: 1 addition & 0 deletions routers/web/org/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ func MoveIssues(ctx *context.Context) {
form := &movedIssuesForm{}
if err = json.NewDecoder(ctx.Req.Body).Decode(&form); err != nil {
ctx.ServerError("DecodeMovedIssuesForm", err)
return
}

issueIDs := make([]int64, 0, len(form.Issues))
Expand Down
1 change: 1 addition & 0 deletions routers/web/repo/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ func DeleteFilePost(ctx *context.Context) {
} else {
ctx.ServerError("DeleteRepoFile", err)
}
return
}

ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath))
Expand Down