diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2021-12-15 14:59:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 14:59:57 +0800 |
commit | 4da1d9781025aa4a85899b1ddeb25aabbaa82703 (patch) | |
tree | 9714f71f2fb042e44d418fbcfc56cd8440a1bbb1 /routers/web/user/home.go | |
parent | 9d943bf374e56e4d403303a6a2caafc1c79cdb6f (diff) | |
download | gitea-4da1d9781025aa4a85899b1ddeb25aabbaa82703.tar.gz gitea-4da1d9781025aa4a85899b1ddeb25aabbaa82703.zip |
Refactor HTTP request context (#17979)
Diffstat (limited to 'routers/web/user/home.go')
-rw-r--r-- | routers/web/user/home.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/user/home.go b/routers/web/user/home.go index bad621f91f..975262cf9c 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -839,7 +839,7 @@ func ShowSSHKeys(ctx *context.Context, uid int64) { buf.WriteString(keys[i].OmitEmail()) buf.WriteString("\n") } - ctx.PlainText(200, buf.Bytes()) + ctx.PlainTextBytes(http.StatusOK, buf.Bytes()) } // ShowGPGKeys output all the public GPG keys of user by uid @@ -878,7 +878,7 @@ func ShowGPGKeys(ctx *context.Context, uid int64) { } } writer.Close() - ctx.PlainText(200, buf.Bytes()) + ctx.PlainTextBytes(http.StatusOK, buf.Bytes()) } // Email2User show user page via email |