diff options
Diffstat (limited to 'routers/private/key.go')
-rw-r--r-- | routers/private/key.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/private/key.go b/routers/private/key.go index 30fde73c8a..3366b764e6 100644 --- a/routers/private/key.go +++ b/routers/private/key.go @@ -28,7 +28,7 @@ func UpdatePublicKeyInRepo(ctx *context.PrivateContext) { deployKey, err := asymkey_model.GetDeployKeyByRepo(keyID, repoID) if err != nil { if asymkey_model.IsErrDeployKeyNotExist(err) { - ctx.PlainText(http.StatusOK, []byte("success")) + ctx.PlainText(http.StatusOK, "success") return } ctx.JSON(http.StatusInternalServerError, private.Response{ @@ -44,7 +44,7 @@ func UpdatePublicKeyInRepo(ctx *context.PrivateContext) { return } - ctx.PlainText(http.StatusOK, []byte("success")) + ctx.PlainText(http.StatusOK, "success") } // AuthorizedPublicKeyByContent searches content as prefix (leak e-mail part) @@ -59,5 +59,5 @@ func AuthorizedPublicKeyByContent(ctx *context.PrivateContext) { }) return } - ctx.PlainText(http.StatusOK, []byte(publicKey.AuthorizedString())) + ctx.PlainText(http.StatusOK, publicKey.AuthorizedString()) } |