From c4d70a032564f610b7215d3d3973943abbc7395f Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 11 Aug 2021 02:31:13 +0200 Subject: Rename ctx.Form() to ctx.FormString() and move code into own file (#16571) Followup from #16562 prepare for #16567 * Rename ctx.Form() to ctx.FormString() * Reimplement FormX func to need less code and cpu cycles * Move code into own file --- routers/api/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/api/v1/api.go') diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index b2202254da..6de47ddc7e 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -93,7 +93,7 @@ import ( func sudo() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { - sudo := ctx.Form("sudo") + sudo := ctx.FormString("sudo") if len(sudo) == 0 { sudo = ctx.Req.Header.Get("Sudo") } -- cgit v1.2.3