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/private/key.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/private/key.go') diff --git a/routers/private/key.go b/routers/private/key.go index 1e60af232a..4f518e41f0 100644 --- a/routers/private/key.go +++ b/routers/private/key.go @@ -50,7 +50,7 @@ func UpdatePublicKeyInRepo(ctx *context.PrivateContext) { // AuthorizedPublicKeyByContent searches content as prefix (leak e-mail part) // and returns public key found. func AuthorizedPublicKeyByContent(ctx *context.PrivateContext) { - content := ctx.Form("content") + content := ctx.FormString("content") publicKey, err := models.SearchPublicKeyByContent(content) if err != nil { -- cgit v1.2.3