summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-12-15 14:59:57 +0800
committerGitHub <noreply@github.com>2021-12-15 14:59:57 +0800
commit4da1d9781025aa4a85899b1ddeb25aabbaa82703 (patch)
tree9714f71f2fb042e44d418fbcfc56cd8440a1bbb1 /routers/api/v1/user
parent9d943bf374e56e4d403303a6a2caafc1c79cdb6f (diff)
downloadgitea-4da1d9781025aa4a85899b1ddeb25aabbaa82703.tar.gz
gitea-4da1d9781025aa4a85899b1ddeb25aabbaa82703.zip
Refactor HTTP request context (#17979)
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r--routers/api/v1/user/gpg_key.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go
index b0f9f1feb3..a90e8c30f0 100644
--- a/routers/api/v1/user/gpg_key.go
+++ b/routers/api/v1/user/gpg_key.go
@@ -157,7 +157,7 @@ func GetVerificationToken(ctx *context.APIContext) {
// "$ref": "#/responses/notFound"
token := asymkey_model.VerificationToken(ctx.User, 1)
- ctx.PlainText(http.StatusOK, []byte(token))
+ ctx.PlainText(http.StatusOK, token)
}
// VerifyUserGPGKey creates new GPG key to given user by ID.