make fmt
This commit is contained in:
parent
2706e89138
commit
900ceb2dfd
|
@ -8,8 +8,9 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
_ "code.gitea.io/gitea/models"
|
|
||||||
"code.gitea.io/gitea/models/unittest"
|
"code.gitea.io/gitea/models/unittest"
|
||||||
|
|
||||||
|
_ "code.gitea.io/gitea/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
|
|
@ -8,13 +8,14 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
_ "code.gitea.io/gitea/models"
|
|
||||||
issues_model "code.gitea.io/gitea/models/issues"
|
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/unittest"
|
||||||
_ "code.gitea.io/gitea/models/user"
|
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"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"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -56,13 +56,13 @@ func Person(ctx *context.APIContext) {
|
||||||
ctx.Error(http.StatusInternalServerError, "Set PreferredUsername", err)
|
ctx.Error(http.StatusInternalServerError, "Set PreferredUsername", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
person.URL = ap.IRI(setting.AppURL + username)
|
person.URL = ap.IRI(setting.AppURL + username)
|
||||||
|
|
||||||
person.Icon = ap.Image{
|
person.Icon = ap.Image{
|
||||||
Type: ap.ImageType,
|
Type: ap.ImageType,
|
||||||
MediaType: "image/png",
|
MediaType: "image/png",
|
||||||
URL: ap.IRI(user.AvatarLink()),
|
URL: ap.IRI(user.AvatarLink()),
|
||||||
}
|
}
|
||||||
|
|
||||||
person.Inbox = nil
|
person.Inbox = nil
|
||||||
|
@ -91,7 +91,7 @@ func Person(ctx *context.APIContext) {
|
||||||
ctx.Error(http.StatusInternalServerError, "Unmarshall", err)
|
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.Header().Add("Content-Type", "application/activity+json")
|
||||||
ctx.Resp.WriteHeader(http.StatusOK)
|
ctx.Resp.WriteHeader(http.StatusOK)
|
||||||
|
|
|
@ -8,8 +8,9 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
_ "code.gitea.io/gitea/models"
|
|
||||||
"code.gitea.io/gitea/models/unittest"
|
"code.gitea.io/gitea/models/unittest"
|
||||||
|
|
||||||
|
_ "code.gitea.io/gitea/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
|
Loading…
Reference in New Issue