summaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-07-13 17:39:19 +0000
committerGitHub <noreply@github.com>2022-07-13 18:39:19 +0100
commit07ec8288bff6295c7db5558846153a61625af80d (patch)
tree2ebd13f3ef66124b67073d31605876e9915b8450 /routers/api
parent9cd1f38f707e274c84471b20eeaf1b5fef39175c (diff)
downloadgitea-07ec8288bff6295c7db5558846153a61625af80d.tar.gz
gitea-07ec8288bff6295c7db5558846153a61625af80d.zip
Add missing return for when topic isn't found (#20351)
Add missing return to DeleteTopic API when the topic is not found.
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/repo/topic.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/repo/topic.go b/routers/api/v1/repo/topic.go
index 1cc2c50dc2..64dc763dc3 100644
--- a/routers/api/v1/repo/topic.go
+++ b/routers/api/v1/repo/topic.go
@@ -240,6 +240,7 @@ func DeleteTopic(ctx *context.APIContext) {
if topic == nil {
ctx.NotFound()
+ return
}
ctx.Status(http.StatusNoContent)