aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/topic.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/topic.go')
-rw-r--r--routers/api/v1/repo/topic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/topic.go b/routers/api/v1/repo/topic.go
index 9852caa989..6b9eedf6e0 100644
--- a/routers/api/v1/repo/topic.go
+++ b/routers/api/v1/repo/topic.go
@@ -162,7 +162,7 @@ func AddTopic(ctx *context.APIContext) {
// "422":
// "$ref": "#/responses/invalidTopicsError"
- topicName := strings.TrimSpace(strings.ToLower(ctx.Params(":topic")))
+ topicName := strings.TrimSpace(strings.ToLower(ctx.PathParam(":topic")))
if !repo_model.ValidateTopic(topicName) {
ctx.JSON(http.StatusUnprocessableEntity, map[string]any{
@@ -229,7 +229,7 @@ func DeleteTopic(ctx *context.APIContext) {
// "422":
// "$ref": "#/responses/invalidTopicsError"
- topicName := strings.TrimSpace(strings.ToLower(ctx.Params(":topic")))
+ topicName := strings.TrimSpace(strings.ToLower(ctx.PathParam(":topic")))
if !repo_model.ValidateTopic(topicName) {
ctx.JSON(http.StatusUnprocessableEntity, map[string]any{