Skip to content

Commit 10ea8be

Browse files
Gustedzeripath
Gusted
authored andcommitted
Add missing return for when topic isn't found (go-gitea#20351)
Backport go-gitea#20351 Add missing return to DeleteTopic API when the topic is not found.
1 parent 3f5d727 commit 10ea8be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/api/v1/repo/topic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ func DeleteTopic(ctx *context.APIContext) {
240240

241241
if topic == nil {
242242
ctx.NotFound()
243+
return
243244
}
244245

245246
ctx.Status(http.StatusNoContent)

0 commit comments

Comments
 (0)