Skip to content

Commit

Permalink
Add missing return for when topic isn't found (go-gitea#20351)
Browse files Browse the repository at this point in the history
Backport go-gitea#20351

Add missing return to DeleteTopic API when the topic is not found.
  • Loading branch information
Gusted authored and zeripath committed Jul 17, 2022
1 parent 3f5d727 commit 10ea8be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routers/api/v1/repo/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func DeleteTopic(ctx *context.APIContext) {

if topic == nil {
ctx.NotFound()
return
}

ctx.Status(http.StatusNoContent)
Expand Down

0 comments on commit 10ea8be

Please sign in to comment.