File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed
routers/api/v1/activitypub Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 8
8
"path/filepath"
9
9
"testing"
10
10
11
- _ "code.gitea.io/gitea/models"
12
11
"code.gitea.io/gitea/models/unittest"
12
+
13
+ _ "code.gitea.io/gitea/models"
13
14
)
14
15
15
16
func TestMain (m * testing.M ) {
Original file line number Diff line number Diff line change @@ -8,13 +8,14 @@ import (
8
8
"path/filepath"
9
9
"testing"
10
10
11
- _ "code.gitea.io/gitea/models"
12
11
issues_model "code.gitea.io/gitea/models/issues"
13
- _ "code.gitea.io/gitea/models/repo"
14
12
"code.gitea.io/gitea/models/unittest"
15
- _ "code.gitea.io/gitea/models/user"
16
13
"code.gitea.io/gitea/modules/setting"
17
14
15
+ _ "code.gitea.io/gitea/models"
16
+ _ "code.gitea.io/gitea/models/repo"
17
+ _ "code.gitea.io/gitea/models/user"
18
+
18
19
"github.com/stretchr/testify/assert"
19
20
)
20
21
Original file line number Diff line number Diff line change @@ -56,13 +56,13 @@ func Person(ctx *context.APIContext) {
56
56
ctx .Error (http .StatusInternalServerError , "Set PreferredUsername" , err )
57
57
return
58
58
}
59
-
59
+
60
60
person .URL = ap .IRI (setting .AppURL + username )
61
61
62
62
person .Icon = ap.Image {
63
- Type : ap .ImageType ,
63
+ Type : ap .ImageType ,
64
64
MediaType : "image/png" ,
65
- URL : ap .IRI (user .AvatarLink ()),
65
+ URL : ap .IRI (user .AvatarLink ()),
66
66
}
67
67
68
68
person .Inbox = nil
@@ -91,7 +91,7 @@ func Person(ctx *context.APIContext) {
91
91
ctx .Error (http .StatusInternalServerError , "Unmarshall" , err )
92
92
}
93
93
94
- jsonmap ["@context" ] = []string {"https://www.w3.org/ns/activitystreams" , "https://w3id.org/security/v1" }
94
+ jsonmap ["@context" ] = []string {"https://www.w3.org/ns/activitystreams" , "https://w3id.org/security/v1" }
95
95
96
96
ctx .Resp .Header ().Add ("Content-Type" , "application/activity+json" )
97
97
ctx .Resp .WriteHeader (http .StatusOK )
Original file line number Diff line number Diff line change 8
8
"path/filepath"
9
9
"testing"
10
10
11
- _ "code.gitea.io/gitea/models"
12
11
"code.gitea.io/gitea/models/unittest"
12
+
13
+ _ "code.gitea.io/gitea/models"
13
14
)
14
15
15
16
func TestMain (m * testing.M ) {
You can’t perform that action at this time.
0 commit comments