From 900ceb2dfde76927f89792ca795b3a635cc5cb5d Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 14 Jun 2022 14:12:00 +0200 Subject: [PATCH] make fmt --- models/git/main_test.go | 3 ++- models/issues/main_test.go | 7 ++++--- routers/api/v1/activitypub/person.go | 8 ++++---- services/gitdiff/main_test.go | 3 ++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/models/git/main_test.go b/models/git/main_test.go index dc30dfaad7..41e6ac4704 100644 --- a/models/git/main_test.go +++ b/models/git/main_test.go @@ -8,8 +8,9 @@ import ( "path/filepath" "testing" - _ "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unittest" + + _ "code.gitea.io/gitea/models" ) func TestMain(m *testing.M) { diff --git a/models/issues/main_test.go b/models/issues/main_test.go index e34bef62ca..89f9e1c999 100644 --- a/models/issues/main_test.go +++ b/models/issues/main_test.go @@ -8,13 +8,14 @@ import ( "path/filepath" "testing" - _ "code.gitea.io/gitea/models" issues_model "code.gitea.io/gitea/models/issues" - _ "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" - _ "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" + _ "code.gitea.io/gitea/models" + _ "code.gitea.io/gitea/models/repo" + _ "code.gitea.io/gitea/models/user" + "github.com/stretchr/testify/assert" ) diff --git a/routers/api/v1/activitypub/person.go b/routers/api/v1/activitypub/person.go index 22f00c01e0..c74feadb89 100644 --- a/routers/api/v1/activitypub/person.go +++ b/routers/api/v1/activitypub/person.go @@ -56,13 +56,13 @@ func Person(ctx *context.APIContext) { ctx.Error(http.StatusInternalServerError, "Set PreferredUsername", err) return } - + person.URL = ap.IRI(setting.AppURL + username) person.Icon = ap.Image{ - Type: ap.ImageType, + Type: ap.ImageType, MediaType: "image/png", - URL: ap.IRI(user.AvatarLink()), + URL: ap.IRI(user.AvatarLink()), } person.Inbox = nil @@ -91,7 +91,7 @@ func Person(ctx *context.APIContext) { ctx.Error(http.StatusInternalServerError, "Unmarshall", err) } - jsonmap["@context"] = []string{"https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"} + jsonmap["@context"] = []string{"https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"} ctx.Resp.Header().Add("Content-Type", "application/activity+json") ctx.Resp.WriteHeader(http.StatusOK) diff --git a/services/gitdiff/main_test.go b/services/gitdiff/main_test.go index 17d0da6276..0d36a600f6 100644 --- a/services/gitdiff/main_test.go +++ b/services/gitdiff/main_test.go @@ -8,8 +8,9 @@ import ( "path/filepath" "testing" - _ "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unittest" + + _ "code.gitea.io/gitea/models" ) func TestMain(m *testing.M) {