1
1
mirror of https://github.com/go-gitea/gitea synced 2024-07-07 10:35:48 +00:00

Fix lint errors

This commit is contained in:
Anthony Wang 2022-05-09 19:10:45 -05:00
parent aa962c6ee9
commit 364838c11b
No known key found for this signature in database
GPG Key ID: BC96B00AEC5F2D76
2 changed files with 5 additions and 4 deletions

View File

@ -12,5 +12,6 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", ".."))
testOps := unittest.TestOptions{GiteaRootPath: filepath.Join("..", "..")}
unittest.MainTest(m, &testOps)
}

View File

@ -76,12 +76,12 @@ func Person(ctx *context.APIContext) {
publicKeyType.SetW3IDSecurityV1Owner(ownerProp)
publicKeyPemProp := streams.NewW3IDSecurityV1PublicKeyPemProperty()
if publicKeyPem, err := activitypub.GetPublicKey(user); err != nil {
publicKeyPem, err := activitypub.GetPublicKey(user)
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetPublicKey", err)
return
} else {
publicKeyPemProp.Set(publicKeyPem)
}
publicKeyPemProp.Set(publicKeyPem)
publicKeyType.SetW3IDSecurityV1PublicKeyPem(publicKeyPemProp)
publicKeyProp.AppendW3IDSecurityV1PublicKey(publicKeyType)